From 28f3c1f489447985ad95f6930176417ac8bc6307 Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <yannick.lecaillez@forgerock.com>
Date: Tue, 19 May 2015 14:08:45 +0000
Subject: [PATCH] Minor cleanup (final, useless getters)
---
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/types/CacheEntry.java | 62 +++----------------------------
1 files changed, 6 insertions(+), 56 deletions(-)
diff --git a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/types/CacheEntry.java b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/types/CacheEntry.java
index 99095a1..7d86190 100644
--- a/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/types/CacheEntry.java
+++ b/opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/types/CacheEntry.java
@@ -28,8 +28,6 @@
import org.opends.server.api.Backend;
-
-
/**
* This class defines a Directory Server cache entry, which is simply
* used to store an entry with its associated backend and entry ID.
@@ -43,15 +41,13 @@
public final class CacheEntry
{
/** The backend with which this cache entry is associated. */
- private Backend<?> backend;
+ private final Backend<?> backend;
/** The entry itself. */
- private Entry entry;
+ private final Entry entry;
/** The entry ID for the entry within the backend. */
- private long entryID;
-
-
+ private final long entryID;
/**
* Creates a new cache entry with the provided information.
@@ -67,8 +63,6 @@
this.entryID = entryID;
}
-
-
/**
* Retrieves the entry for this cache entry.
*
@@ -79,44 +73,16 @@
return entry;
}
-
-
- /**
- * Specifies the entry for this cache entry.
- *
- * @param entry The entry for this cache entry.
- */
- public void setEntry(Entry entry)
- {
- this.entry = entry;
- }
-
-
-
/**
* Retrieves the backend for this cache entry.
*
* @return The backend for this cache entry.
*/
- public Backend getBackend()
+ public Backend<?> getBackend()
{
return backend;
}
-
-
- /**
- * Specifies the backend for this cache entry.
- *
- * @param backend The backend for this cache entry.
- */
- public void setBackend(Backend backend)
- {
- this.backend = backend;
- }
-
-
-
/**
* Retrieves the entry ID for this cache entry.
*
@@ -127,20 +93,6 @@
return entryID;
}
-
-
- /**
- * Specifies the entry ID for this cache entry.
- *
- * @param entryID The entryID for this cache entry.
- */
- public void setEntryID(long entryID)
- {
- this.entryID = entryID;
- }
-
-
-
/**
* Retrieves the DN for this cache entry.
*
@@ -151,21 +103,18 @@
return entry.getName();
}
-
-
/**
* Retrieves the hash code for this cache entry. It will be the
* integer representation of the entry ID.
*
* @return The hash code for this cache entry.
*/
+ @Override
public int hashCode()
{
return (int) entryID;
}
-
-
/**
* Indicates whether this cache entry is equal to the provided \
* object. They will be considered equal if the provided object is
@@ -176,6 +125,7 @@
* @return <CODE>true</CODE> if the provided object is equal to
* this cache entry, or <CODE>false</CODE> if not.
*/
+ @Override
public boolean equals(Object o)
{
if (o == null)
--
Gitblit v1.10.0