public interface Partition
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ID
Default id used for context entry if context entry doesn't exists
|
static String |
ROOT_ID
root ID common to all partitions
|
Modifier and Type | Method and Description |
---|---|
void |
add(AddOperationContext addContext)
Adds an entry to this ContextPartition.
|
PartitionReadTxn |
beginReadTransaction()
Start a read transaction
|
PartitionWriteTxn |
beginWriteTransaction()
Start a write transaction
|
org.apache.directory.api.ldap.model.entry.Entry |
delete(DeleteOperationContext deleteContext)
Deletes a leaf entry from this ContextPartition: non-leaf entries cannot be
deleted until this operation has been applied to their children.
|
void |
destroy(PartitionTxn partitionTxn)
Instructs this Partition to synchronize with it's persistent store, and
destroy all held resources, in preparation for a shutdown event.
|
void |
dumpIndex(PartitionTxn partitionTxn,
OutputStream stream,
String name)
Dump the requested index to a given stream
|
String |
getContextCsn(PartitionTxn partitionTxn)
Get the contextCSN
|
String |
getId()
Gets the unique identifier for this partition.
|
org.apache.directory.api.ldap.model.schema.SchemaManager |
getSchemaManager()
Gets the schema manager assigned to this Partition.
|
Subordinates |
getSubordinates(PartitionTxn partitionTxn,
org.apache.directory.api.ldap.model.entry.Entry entry)
Return the number of children and subordinates for a given entry
|
org.apache.directory.api.ldap.model.name.Dn |
getSuffixDn()
Gets the normalized suffix as an Dn for this Partition after it has
been initialized.
|
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Fast operation to check and see if a particular entry exists.
|
void |
initialize()
Initializes this partition.
|
boolean |
isInitialized()
Checks to see if this partition is initialized or not.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext)
Looks up an entry by distinguished/absolute name.
|
void |
modify(ModifyOperationContext modifyContext)
Modifies an entry by adding, removing or replacing a set of attributes.
|
void |
move(MoveOperationContext moveContext)
Transplants a child entry, to a position in the namespace under a new
parent entry.
|
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
Transplants a child entry, to a position in the namespace under a new
parent entry and changes the RN of the child entry which can optionally
have its old RN attributes removed.
|
void |
rename(RenameOperationContext renameContext)
Modifies an entry by changing its relative name.
|
void |
repair()
Repair this partition.
|
void |
saveContextCsn(PartitionTxn partitionTxn)
Saves the context CSN value in the context entry of the partition
|
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Conducts a search against this ContextPartition.
|
void |
setId(String id)
Sets the unique identifier for this partition.
|
void |
setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
Sets the schema manager assigned to this Partition.
|
void |
setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffixDn)
Sets the suffix Dn, must be normalized.
|
void |
sync()
Flushes any changes made to this partition now.
|
void |
unbind(UnbindOperationContext unbindContext)
Represents an unbind operation issued by an authenticated client.
|
static final String DEFAULT_ID
PartitionReadTxn beginReadTransaction()
PartitionWriteTxn beginWriteTransaction()
String getId()
void setId(String id)
id
- the unique identifier for this partitionorg.apache.directory.api.ldap.model.schema.SchemaManager getSchemaManager()
void setSchemaManager(org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager)
schemaManager
- The SchemaManager instancevoid initialize() throws org.apache.directory.api.ldap.model.exception.LdapException
isInitialized()
will return true if
doInit()
returns without any errors. destroy()
is called automatically
as a clean-up process if doInit()
throws an exception.org.apache.directory.api.ldap.model.exception.LdapException
- if initialization fails in any wayvoid repair() throws Exception
Exception
- if repair fails in any wayorg.apache.directory.api.ldap.model.name.Dn getSuffixDn()
IllegalStateException
- if the Partition has not been initializedvoid setSuffixDn(org.apache.directory.api.ldap.model.name.Dn suffixDn) throws org.apache.directory.api.ldap.model.exception.LdapInvalidDnException
suffixDn
- the new suffix Dnorg.apache.directory.api.ldap.model.exception.LdapInvalidDnException
- If the Dn is invalidvoid destroy(PartitionTxn partitionTxn) throws org.apache.directory.api.ldap.model.exception.LdapException
partitionTxn
- The transaction to useorg.apache.directory.api.ldap.model.exception.LdapException
- If we can't destroy the partitionboolean isInitialized()
void sync() throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
- if buffers cannot be flushed to diskorg.apache.directory.api.ldap.model.entry.Entry delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
deleteContext
- the context of the entry to
delete from this ContextPartition.org.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
addContext
- the context used to add and entry to this ContextPartitionorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
modifyContext
- The context containing the modification operation
to perform on the entry which is one of constants specified by the
DirContext interface:
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
.org.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsEntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
searchContext
- The context containing the information used by the operationorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsorg.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
lookupContext
- The context containing the parametersorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsboolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
hasEntryContext
- The context used to pass informationsorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
renameContext
- the modify Dn contextorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveContext
- The context containing the DNs to moveorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRenameContext
- The context contain all the information about
the modifyDN operationorg.apache.directory.api.ldap.model.exception.LdapException
- if there are any problemsvoid unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
unbindContext
- the context used to unbindorg.apache.directory.api.ldap.model.exception.LdapException
- if something goes wrongvoid dumpIndex(PartitionTxn partitionTxn, OutputStream stream, String name) throws IOException
partitionTxn
- The transaction to usestream
- The Stream used to dump the indexname
- The index to dump to stdoutIOException
- if we can't write the dataString getContextCsn(PartitionTxn partitionTxn)
partitionTxn
- The transaction to usevoid saveContextCsn(PartitionTxn partitionTxn) throws org.apache.directory.api.ldap.model.exception.LdapException
partitionTxn
- The transaction to useorg.apache.directory.api.ldap.model.exception.LdapException
- If the context can't be savedSubordinates getSubordinates(PartitionTxn partitionTxn, org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
partitionTxn
- The transaction to useentry
- The entryorg.apache.directory.api.ldap.model.exception.LdapException
- If we had an issue while processing the requestCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.