org.opends.server.types
Class CacheEntry

java.lang.Object
  extended by org.opends.server.types.CacheEntry

@PublicAPI(stability=VOLATILE,
           mayInstantiate=true,
           mayExtend=false,
           mayInvoke=true,
           notes="This should only be used within a backend")
public final class CacheEntry
extends java.lang.Object

This class defines a Directory Server cache entry, which is simply used to store an entry with its associated backend and entry ID.


Constructor Summary
CacheEntry(Entry entry, Backend backend, long entryID)
          Creates a new cache entry with the provided information.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether this cache entry is equal to the provided \ object.
 Backend getBackend()
          Retrieves the backend for this cache entry.
 DN getDN()
          Retrieves the DN for this cache entry.
 Entry getEntry()
          Retrieves the entry for this cache entry.
 long getEntryID()
          Retrieves the entry ID for this cache entry.
 int hashCode()
          Retrieves the hash code for this cache entry.
 void setBackend(Backend backend)
          Specifies the backend for this cache entry.
 void setEntry(Entry entry)
          Specifies the entry for this cache entry.
 void setEntryID(long entryID)
          Specifies the entry ID for this cache entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheEntry

public CacheEntry(Entry entry,
                  Backend backend,
                  long entryID)
Creates a new cache entry with the provided information.

Parameters:
entry - The entry for this cache entry.
backend - The backend for this cache entry.
entryID - The entry ID for this cache entry.
Method Detail

getEntry

public Entry getEntry()
Retrieves the entry for this cache entry.

Returns:
The entry for this cache entry.

setEntry

public void setEntry(Entry entry)
Specifies the entry for this cache entry.

Parameters:
entry - The entry for this cache entry.

getBackend

public Backend getBackend()
Retrieves the backend for this cache entry.

Returns:
The backend for this cache entry.

setBackend

public void setBackend(Backend backend)
Specifies the backend for this cache entry.

Parameters:
backend - The backend for this cache entry.

getEntryID

public long getEntryID()
Retrieves the entry ID for this cache entry.

Returns:
The entry ID for this cache entry.

setEntryID

public void setEntryID(long entryID)
Specifies the entry ID for this cache entry.

Parameters:
entryID - The entryID for this cache entry.

getDN

public DN getDN()
Retrieves the DN for this cache entry.

Returns:
The DN for this cache entry.

hashCode

public int hashCode()
Retrieves the hash code for this cache entry. It will be the integer representation of the entry ID.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for this cache entry.

equals

public boolean equals(java.lang.Object o)
Indicates whether this cache entry is equal to the provided \ object. They will be considered equal if the provided object is a cache entry with the same entry and entry ID.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object for which to make the determination.
Returns:
true if the provided object is equal to this cache entry, or false if not.