|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.partition.AbstractPartition
public abstract class AbstractPartition
A Partition
that helps users to implement their own partition.
Most methods are implemented by default. Please look at the description of
each methods for the detail of implementations.
Field Summary | |
---|---|
protected DirectoryService |
directoryService
DirectoryService specified at init(DirectoryService) . |
protected boolean |
initialized
true if and only if this partition is initialized. |
Fields inherited from interface org.apache.directory.server.core.partition.Partition |
---|
DEFAULT_CACHE_SIZE, DEFAULT_PARTITION_IMPLEMENTATION, SYSTEM_PARTITION_NAME |
Constructor Summary | |
---|---|
protected |
AbstractPartition()
|
Method Summary | |
---|---|
void |
destroy()
Calls doDestroy() where you have to put your destroy code in,
and clears default properties. |
protected void |
doDestroy()
Override this method to put your initialization code. |
protected void |
doInit()
Override this method to put your initialization code. |
DirectoryService |
getDirectoryService()
Returns DirectoryService that is provided from
init(DirectoryService) . |
boolean |
hasEntry(EntryOperationContext entryContext)
This method calls Partition.lookup(LookupOperationContext) and return true
if it returns an entry by default. |
void |
init(DirectoryService directoryService)
Sets up (directoryService and calls doInit() where you have to put your
initialization code in. |
boolean |
isInitialized()
Returns true if this context partition is initialized successfully. |
ClonedServerEntry |
lookup(LookupOperationContext lookupContext)
This method calls Partition.lookup(LookupOperationContext)
with null attributeIds by default. |
void |
sync()
This method does nothing by default. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.directory.server.core.partition.Partition |
---|
add, bind, delete, getCacheSize, getId, getSuffix, getSuffixDn, getUpSuffixDn, list, lookup, modify, move, moveAndRename, rename, search, setCacheSize, setId, setSuffix, unbind |
Field Detail |
---|
protected DirectoryService directoryService
DirectoryService
specified at init(DirectoryService)
.
protected boolean initialized
Constructor Detail |
---|
protected AbstractPartition()
Method Detail |
---|
public final void init(DirectoryService directoryService) throws java.lang.Exception
doInit()
where you have to put your
initialization code in. isInitialized()
will return true if
doInit()
returns without any errors. destroy()
is called automatically
as a clean-up process if doInit()
throws an exception.
init
in interface Partition
directoryService
- the directory core for the server.
java.lang.Exception
- if initialization fails in any wayprotected void doInit()
public final void destroy()
doDestroy()
where you have to put your destroy code in,
and clears default properties. Once this method is invoked, isInitialized()
will return false.
destroy
in interface Partition
protected void doDestroy()
public final boolean isInitialized()
isInitialized
in interface Partition
public final DirectoryService getDirectoryService()
DirectoryService
that is provided from
init(DirectoryService)
.
public void sync() throws java.lang.Exception
sync
in interface Partition
java.lang.Exception
- if buffers cannot be flushed to diskpublic boolean hasEntry(EntryOperationContext entryContext) throws java.lang.Exception
Partition.lookup(LookupOperationContext)
and return true
if it returns an entry by default. Please override this method if
there is more effective way for your implementation.
hasEntry
in interface Partition
entryContext
- The context used to pass informations
java.lang.Exception
- if there are any problemspublic ClonedServerEntry lookup(LookupOperationContext lookupContext) throws java.lang.Exception
Partition.lookup(LookupOperationContext)
with null attributeIds by default. Please override
this method if there is more effective way for your implementation.
lookup
in interface Partition
lookupContext
- The context containing the parameters
java.lang.Exception
- if there are any problems
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |