org.opends.server.backends.jeb.importLDIF
Class DNContext

java.lang.Object
  extended by org.opends.server.backends.jeb.importLDIF.DNContext

public class DNContext
extends java.lang.Object

This class represents the import context for a destination base DN.


Constructor Summary
DNContext()
           
 
Method Summary
 void addPending(DN dn)
          Add specified DN to the pending map.
 java.util.Map<AttributeType,AttributeIndex> getAttrIndexMap()
          Return the attribute type attribute index map.
 DN getBaseDN()
          Get the destination base DN.
 BufferManager getBufferManager()
          Return the buffer manager.
 LocalDBBackendCfg getConfig()
          Get the configuration of the destination backend.
 EntryContainer getEntryContainer()
          Get the entry entryContainer for the destination base DN.
 long getEntryInsertCount()
          Get the number of new LDAP entries imported into the entry database.
 java.util.List<DN> getExcludeBranches()
          Retrieves the set of base DNs that specify the set of entries to exclude from the import.
 java.util.ArrayList<EntryID> getIDs()
          Get the superior IDs of the previous imported entry.
 java.util.List<DN> getIncludeBranches()
          Retrieves the set of base DNs that specify the set of entries to include in the import.
 LDIFImportConfig getLDIFImportConfig()
          Get the requested LDIF import configuration.
 LDIFReader getLDIFReader()
          Get the source LDIF reader.
 DN getParentDN()
          Get the parent DN of the previous imported entry.
 EntryID getParentID(DN parentDN, DN2ID dn2id, com.sleepycat.je.Transaction txn)
          Get the Entry ID of the parent entry.
 EntryContainer getSrcEntryContainer()
          Get the source entry entryContainer for the destination base DN.
 java.util.concurrent.BlockingQueue<WorkElement> getWorkQueue()
          Get the work queue.
 void incrEntryInsertCount(long delta)
          Increment the number of new LDAP entries imported into the entry database by the given amount.
 void removePending(DN dn)
          Remove the specified DN from the pending map.
 void setBaseDN(DN baseDN)
          Set the destination base DN.
 void setBufferManager(BufferManager bufferManager)
          Set the substring buffer manager to the specified buffer manager.
 void setConfig(LocalDBBackendCfg config)
          Set the configuration of the destination backend.
 void setEntryContainer(EntryContainer entryContainer)
          Set the entry entryContainer for the destination base DN.
 void setExcludeBranches(java.util.List<DN> excludeBranches)
          Specifies the set of base DNs that specify the set of entries to exclude from the import.
 void setIDs(java.util.ArrayList<EntryID> IDs)
          Set the superior IDs of the previous imported entry.
 void setIncludeBranches(java.util.List<DN> includeBranches)
          Specifies the set of base DNs that specify the set of entries to include in the import.
 void setIndexesTrusted()
          Set all the indexes to trusted.
 void setLDIFImportConfig(LDIFImportConfig ldifImportConfig)
          Set the requested LDIF import configuration.
 void setLDIFReader(LDIFReader ldifReader)
          Set the source LDIF reader.
 void setParentDN(DN parentDN)
          Set the parent DN of the previous imported entry.
 void setSrcEntryContainer(EntryContainer srcEntryContainer)
          Set the source entry entryContainer for the destination base DN.
 void setWorkQueue(java.util.concurrent.BlockingQueue<WorkElement> workQueue)
          Set the work queue to the specified work queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNContext

public DNContext()
Method Detail

getWorkQueue

public java.util.concurrent.BlockingQueue<WorkElement> getWorkQueue()
Get the work queue.

Returns:
The work queue.

setWorkQueue

public void setWorkQueue(java.util.concurrent.BlockingQueue<WorkElement> workQueue)
Set the work queue to the specified work queue.

Parameters:
workQueue - The work queue.

setBaseDN

public void setBaseDN(DN baseDN)
Set the destination base DN.

Parameters:
baseDN - The destination base DN.

getBaseDN

public DN getBaseDN()
Get the destination base DN.

Returns:
The destination base DN.

setConfig

public void setConfig(LocalDBBackendCfg config)
Set the configuration of the destination backend.

Parameters:
config - The destination backend configuration.

getConfig

public LocalDBBackendCfg getConfig()
Get the configuration of the destination backend.

Returns:
The destination backend configuration.

setLDIFImportConfig

public void setLDIFImportConfig(LDIFImportConfig ldifImportConfig)
Set the requested LDIF import configuration.

Parameters:
ldifImportConfig - The LDIF import configuration.

getLDIFImportConfig

public LDIFImportConfig getLDIFImportConfig()
Get the requested LDIF import configuration.

Returns:
The requested LDIF import configuration.

setLDIFReader

public void setLDIFReader(LDIFReader ldifReader)
Set the source LDIF reader.

Parameters:
ldifReader - The source LDIF reader.

getLDIFReader

public LDIFReader getLDIFReader()
Get the source LDIF reader.

Returns:
The source LDIF reader.

setEntryContainer

public void setEntryContainer(EntryContainer entryContainer)
Set the entry entryContainer for the destination base DN.

Parameters:
entryContainer - The entry entryContainer for the destination base DN.

getEntryContainer

public EntryContainer getEntryContainer()
Get the entry entryContainer for the destination base DN.

Returns:
The entry entryContainer for the destination base DN.

setSrcEntryContainer

public void setSrcEntryContainer(EntryContainer srcEntryContainer)
Set the source entry entryContainer for the destination base DN.

Parameters:
srcEntryContainer - The entry source entryContainer for the destination base DN.

getSrcEntryContainer

public EntryContainer getSrcEntryContainer()
Get the source entry entryContainer for the destination base DN.

Returns:
The source entry entryContainer for the destination base DN.

getEntryInsertCount

public long getEntryInsertCount()
Get the number of new LDAP entries imported into the entry database.

Returns:
The number of new LDAP entries imported into the entry database.

incrEntryInsertCount

public void incrEntryInsertCount(long delta)
Increment the number of new LDAP entries imported into the entry database by the given amount.

Parameters:
delta - The amount to add.

getParentDN

public DN getParentDN()
Get the parent DN of the previous imported entry.

Returns:
The parent DN of the previous imported entry.

setParentDN

public void setParentDN(DN parentDN)
Set the parent DN of the previous imported entry.

Parameters:
parentDN - The parent DN of the previous imported entry.

getIDs

public java.util.ArrayList<EntryID> getIDs()
Get the superior IDs of the previous imported entry.

Returns:
The superior IDs of the previous imported entry.

setIDs

public void setIDs(java.util.ArrayList<EntryID> IDs)
Set the superior IDs of the previous imported entry.

Parameters:
IDs - The superior IDs of the previous imported entry.

getExcludeBranches

public java.util.List<DN> getExcludeBranches()
Retrieves the set of base DNs that specify the set of entries to exclude from the import. The contents of the returned list may be altered by the caller.

Returns:
The set of base DNs that specify the set of entries to exclude from the import.

setExcludeBranches

public void setExcludeBranches(java.util.List<DN> excludeBranches)
Specifies the set of base DNs that specify the set of entries to exclude from the import.

Parameters:
excludeBranches - The set of base DNs that specify the set of entries to exclude from the import.

getIncludeBranches

public java.util.List<DN> getIncludeBranches()
Retrieves the set of base DNs that specify the set of entries to include in the import. The contents of the returned list may be altered by the caller.

Returns:
The set of base DNs that specify the set of entries to include in the import.

setIncludeBranches

public void setIncludeBranches(java.util.List<DN> includeBranches)
Specifies the set of base DNs that specify the set of entries to include in the import.

Parameters:
includeBranches - The set of base DNs that specify the set of entries to include in the import.

getAttrIndexMap

public java.util.Map<AttributeType,AttributeIndex> getAttrIndexMap()
Return the attribute type attribute index map.

Returns:
The attribute type attribute index map.

setIndexesTrusted

public void setIndexesTrusted()
                       throws com.sleepycat.je.DatabaseException
Set all the indexes to trusted.

Throws:
com.sleepycat.je.DatabaseException - If the trusted value cannot be updated in the index DB.

getParentID

public EntryID getParentID(DN parentDN,
                           DN2ID dn2id,
                           com.sleepycat.je.Transaction txn)
                    throws com.sleepycat.je.DatabaseException
Get the Entry ID of the parent entry.

Parameters:
parentDN - The parent DN.
dn2id - The DN2ID DB.
txn - A database transaction,
Returns:
The entry ID of the parent entry.
Throws:
com.sleepycat.je.DatabaseException - If a DB error occurs.

addPending

public void addPending(DN dn)
Add specified DN to the pending map.

Parameters:
dn - The DN to add to the map.

removePending

public void removePending(DN dn)
Remove the specified DN from the pending map.

Parameters:
dn - The DN to remove from the map.

setBufferManager

public void setBufferManager(BufferManager bufferManager)
Set the substring buffer manager to the specified buffer manager.

Parameters:
bufferManager - The buffer manager.

getBufferManager

public BufferManager getBufferManager()
Return the buffer manager.

Returns:
The buffer manager.