Package org.opends.server.types
Class CompactEntry
java.lang.Object
org.forgerock.opendj.ldap.AbstractEntry
org.opends.server.types.CompactEntry
- All Implemented Interfaces:
Entry
A compact read-only entry suitable for storing in caches.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompactEntryReturns a compact read-only entry having the same name and real attributes asentry.Returns anIterablecontaining all of the attributes in this entry.intReturns the number of attributes in this entry.getName()Returns the distinguished name of this entry.intReturns an estimate of the size of this entry in bytes.static CompactEntryrenamedShallowCopyOf(CompactEntry entry, Dn newName) Returns a shallow copy of a compact entry having the provided new name.Methods inherited from class org.forgerock.opendj.ldap.AbstractEntry
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.forgerock.opendj.ldap.Entry
addAttribute, addAttribute, addAttribute, addAttributeIfAbsent, clearAttributes, containsAnyAttributes, containsAnyAttributes, containsAttribute, containsAttribute, containsAttribute, getAllAttributes, getAllAttributes, getAttribute, getAttribute, mergeAttribute, parseAttribute, parseAttribute, removeAttribute, removeAttribute, removeAttribute, replaceAttribute, replaceAttribute, setName, setName
-
Method Details
-
copyOfEntryWithoutVirtualAttributes
Returns a compact read-only entry having the same name and real attributes asentry. This method ensures that the compact entry does not contain any virtual attributes.- Parameters:
entry- The entry to be copied.- Returns:
- A compact read-only copy of the provided entry without any virtual attributes.
-
renamedShallowCopyOf
Returns a shallow copy of a compact entry having the provided new name. It is the responsibility of the caller to ensure that the entry contains the attributes contained in the new RDN.- Parameters:
entry- The compact entry to be copied.newName- The new name of the entry.- Returns:
- A shallow copy of a compact entry having the provided new name.
-
getName
Description copied from interface:EntryReturns the distinguished name of this entry.- Returns:
- The distinguished name of this entry.
-
getAttributeCount
public int getAttributeCount()Description copied from interface:EntryReturns the number of attributes in this entry.- Returns:
- The number of attributes.
-
getAllAttributes
Description copied from interface:EntryReturns anIterablecontaining all of the attributes in this entry. The returnedIterablemay be used to remove attributes if permitted by this entry.- Returns:
- An
Iterablecontaining all of the attributes.
-
getSizeInBytes
public int getSizeInBytes()Returns an estimate of the size of this entry in bytes. The estimate does not include the memory used by the parent DN or the attribute description objects, which are assumed to be cached. The estimate assumes that this JVM is using 32-bit pointers.- Returns:
- An estimate of the size of this entry in bytes.
-