public class DefaultOperationManager extends java.lang.Object implements OperationManager
| Modifier and Type | Field and Description |
|---|---|
private DirectoryService |
directoryService
The directory service instance
|
private static boolean |
IS_DEBUG
Speedup for logs
|
private static boolean |
IS_STAT |
private static boolean |
IS_TIME |
private static org.slf4j.Logger |
OPERATION_LOG
A logger specifically for operations
|
private static org.slf4j.Logger |
OPERATION_STAT
A logger specifically for operations statistics
|
private static org.slf4j.Logger |
OPERATION_TIME
A logger specifically for operations time
|
private java.util.concurrent.locks.ReadWriteLock |
rwLock
A lock used to protect against concurrent operations
|
| Constructor and Description |
|---|
DefaultOperationManager(DirectoryService directoryService) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Add an entry into the backend, going through the interceptor chain
|
void |
bind(BindOperationContext bindContext)
TODO document after determining if this method should be here.
|
private org.apache.directory.api.ldap.model.exception.LdapPartialResultException |
buildLdapPartialResultException(org.apache.directory.api.ldap.model.name.Dn childDn) |
private org.apache.directory.api.ldap.model.exception.LdapReferralException |
buildReferralException(org.apache.directory.api.ldap.model.entry.Entry parentEntry,
org.apache.directory.api.ldap.model.name.Dn childDn) |
private org.apache.directory.api.ldap.model.exception.LdapReferralException |
buildReferralExceptionForSearch(org.apache.directory.api.ldap.model.entry.Entry parentEntry,
org.apache.directory.api.ldap.model.name.Dn childDn,
org.apache.directory.api.ldap.model.message.SearchScope scope) |
boolean |
compare(CompareOperationContext compareContext)
TODO document after determining if this method should be here.
|
void |
delete(DeleteOperationContext deleteContext)
TODO document after determining if this method should be here.
|
private void |
eagerlyPopulateFields(OperationContext opContext)
Eagerly populates fields of operation contexts so multiple Interceptors
in the processing pathway can reuse this value without performing a
redundant lookup operation.
|
private void |
ensureStarted() |
private org.apache.directory.api.ldap.model.entry.Entry |
getOriginalEntry(OperationContext opContext) |
org.apache.directory.api.ldap.model.entry.Entry |
getRootDse(GetRootDseOperationContext getRootDseContext)
Get the RooDse entry.
|
java.util.concurrent.locks.ReadWriteLock |
getRWLock() |
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
TODO document after determining if this method should be here.
|
void |
lockRead()
Acquires a ReadLock
|
void |
lockWrite()
Acquires a WriteLock
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext)
TODO document after determining if this method should be here.
|
void |
modify(ModifyOperationContext modifyContext)
TODO document after determining if this method should be here.
|
void |
move(MoveOperationContext moveContext)
TODO document after determining if this method should be here.
|
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
TODO document after determining if this method should be here.
|
void |
rename(RenameOperationContext renameContext)
TODO document after determining if this method should be here.
|
EntryFilteringCursor |
search(SearchOperationContext searchContext)
TODO document after determining if this method should be here.
|
void |
unbind(UnbindOperationContext unbindContext)
TODO document after determining if this method should be here.
|
void |
unlockRead()
Releases a ReadLock
|
void |
unlockWrite()
Releases a WriteLock
|
private static final org.slf4j.Logger OPERATION_LOG
private static final org.slf4j.Logger OPERATION_TIME
private static final org.slf4j.Logger OPERATION_STAT
private static final boolean IS_DEBUG
private static final boolean IS_TIME
private static final boolean IS_STAT
private final DirectoryService directoryService
private java.util.concurrent.locks.ReadWriteLock rwLock
public DefaultOperationManager(DirectoryService directoryService)
public java.util.concurrent.locks.ReadWriteLock getRWLock()
getRWLock in interface OperationManagerpublic void lockRead()
lockRead in interface OperationManagerpublic void lockWrite()
lockWrite in interface OperationManagerpublic void unlockWrite()
unlockWrite in interface OperationManagerpublic void unlockRead()
unlockRead in interface OperationManagerprivate void eagerlyPopulateFields(OperationContext opContext) throws org.apache.directory.api.ldap.model.exception.LdapException
opContext - the operation context to populate with cached fieldsorg.apache.directory.api.ldap.model.exception.LdapExceptionprivate org.apache.directory.api.ldap.model.entry.Entry getOriginalEntry(OperationContext opContext) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate org.apache.directory.api.ldap.model.exception.LdapReferralException buildReferralException(org.apache.directory.api.ldap.model.entry.Entry parentEntry,
org.apache.directory.api.ldap.model.name.Dn childDn)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate org.apache.directory.api.ldap.model.exception.LdapReferralException buildReferralExceptionForSearch(org.apache.directory.api.ldap.model.entry.Entry parentEntry,
org.apache.directory.api.ldap.model.name.Dn childDn,
org.apache.directory.api.ldap.model.message.SearchScope scope)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate org.apache.directory.api.ldap.model.exception.LdapPartialResultException buildLdapPartialResultException(org.apache.directory.api.ldap.model.name.Dn childDn)
public void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
add in interface OperationManageraddContext - The context containing the information to process the additionorg.apache.directory.api.ldap.model.exception.LdapException - If the addition can't be processed successfullypublic void bind(BindOperationContext bindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
bind in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean compare(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
compare in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
delete in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry getRootDse(GetRootDseOperationContext getRootDseContext) throws org.apache.directory.api.ldap.model.exception.LdapException
getRootDse in interface OperationManagergetRootDseContext - The getRootDse() contextorg.apache.directory.api.ldap.model.exception.LdapException - If we can't get back the rootDse entrypublic boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
hasEntry in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
lookup in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
modify in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
move in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
moveAndRename in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
rename in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
search in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void unbind(UnbindOperationContext unbindContext) throws org.apache.directory.api.ldap.model.exception.LdapException
unbind in interface OperationManagerorg.apache.directory.api.ldap.model.exception.LdapExceptionprivate void ensureStarted()
throws org.apache.directory.api.ldap.model.exception.LdapServiceUnavailableException
org.apache.directory.api.ldap.model.exception.LdapServiceUnavailableException