Class CompactEntry

java.lang.Object
org.forgerock.opendj.ldap.AbstractEntry
org.opends.server.types.CompactEntry
All Implemented Interfaces:
Entry

public final class CompactEntry extends AbstractEntry
A compact read-only entry suitable for storing in caches.
  • Method Details

    • copyOfEntryWithoutVirtualAttributes

      public static CompactEntry copyOfEntryWithoutVirtualAttributes(Entry entry)
      Returns a compact read-only entry having the same name and real attributes as entry. 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

      public static CompactEntry renamedShallowCopyOf(CompactEntry entry, Dn newName)
      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

      public Dn getName()
      Description copied from interface: Entry
      Returns the distinguished name of this entry.
      Returns:
      The distinguished name of this entry.
    • getAttributeCount

      public int getAttributeCount()
      Description copied from interface: Entry
      Returns the number of attributes in this entry.
      Returns:
      The number of attributes.
    • getAllAttributes

      public Iterable<Attribute> getAllAttributes()
      Description copied from interface: Entry
      Returns an Iterable containing all of the attributes in this entry. The returned Iterable may be used to remove attributes if permitted by this entry.
      Returns:
      An Iterable containing 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.