org.opends.server.backends.jeb.importLDIF
Interface ImportIDSet

All Known Implementing Classes:
IntegerImportIDSet, LongImportIDSet

public interface ImportIDSet

Interface defining and import ID set.


Method Summary
 void addEntryID(EntryID entryID, int entryLimit, boolean maintainCount)
          Add an entry ID to the set.
 int getMemorySize()
          Return the memory size of a set.
 long getUndefinedSize()
          Return the undefined size.
 boolean isDefined()
          Return if a set is defined or not.
 boolean merge(byte[] dbBytes, ImportIDSet bufImportIDSet, int entryLimit, boolean maintainCount)
          Merge a byte array read from DB with a ID set.
 void merge(ImportIDSet bufImportIDSet, int entryLimit, boolean maintainCount)
          Merge the specified import ID set with the current import ID set using the specified entry limit an maintain count values.
 void reset()
          Reset set.
 void setEntryID(EntryID entryID)
          Set the first entry ID to the specified entry ID.
 void setUndefined()
          Set the import ID set to the undefined state.
 int size()
          Return the size of the set.
 byte[] toDatabase()
          Convert a set to a byte array suitable for saving to DB.
 

Method Detail

addEntryID

void addEntryID(EntryID entryID,
                int entryLimit,
                boolean maintainCount)
Add an entry ID to the set.

Parameters:
entryID - The entry ID to add.
entryLimit - The entry limit.
maintainCount - Maintain count of IDs if in undefined mode.

isDefined

boolean isDefined()
Return if a set is defined or not.

Returns:
True if a set is defined.

getMemorySize

int getMemorySize()
Return the memory size of a set.

Returns:
The sets current memory size.

toDatabase

byte[] toDatabase()
Convert a set to a byte array suitable for saving to DB.

Returns:
A byte array representing the set.

size

int size()
Return the size of the set.

Returns:
The size of the ID set.

merge

boolean merge(byte[] dbBytes,
              ImportIDSet bufImportIDSet,
              int entryLimit,
              boolean maintainCount)
Merge a byte array read from DB with a ID set.

Parameters:
dbBytes - The byte array read from DB.
bufImportIDSet - The import ID set to merge.
entryLimit - The entry limit.
maintainCount - Maintain count of iDs if in undefined mode.
Returns:
True if the merged set is undefined.

merge

void merge(ImportIDSet bufImportIDSet,
           int entryLimit,
           boolean maintainCount)
Merge the specified import ID set with the current import ID set using the specified entry limit an maintain count values.

Parameters:
bufImportIDSet - The import ID set to merge.
entryLimit - The entry limit to use.
maintainCount - True if maintain count is being kept.

setUndefined

void setUndefined()
Set the import ID set to the undefined state.


getUndefinedSize

long getUndefinedSize()
Return the undefined size.

Returns:
The undefined count.

reset

void reset()
Reset set.


setEntryID

void setEntryID(EntryID entryID)
Set the first entry ID to the specified entry ID.

Parameters:
entryID - The entry ID to use.