|
||||||||||
| 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 boolean |
initialized
true if and only if this partition is initialized. |
| Constructor Summary | |
|---|---|
protected |
AbstractPartition()
|
| Method Summary | |
|---|---|
void |
destroy()
Calls doDestroy() where you have to put your destroy code in,
and clears default properties. |
protected abstract void |
doDestroy()
Override this method to put your initialization code. |
protected abstract void |
doInit()
Override this method to put your initialization code. |
boolean |
hasEntry(EntryOperationContext entryContext)
This method calls Partition.lookup(LookupOperationContext) and return true
if it returns an entry by default. |
void |
initialize()
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. |
abstract ClonedServerEntry |
lookup(LookupOperationContext lookupContext)
This method calls Partition.lookup(LookupOperationContext)
with null attributeIds by default. |
abstract 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, getId, getSchemaManager, getSuffix, getSuffixDn, list, modify, move, moveAndRename, rename, search, setId, setSchemaManager, setSuffix, unbind |
| Field Detail |
|---|
protected boolean initialized
| Constructor Detail |
|---|
protected AbstractPartition()
| Method Detail |
|---|
public final void initialize()
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.
initialize in interface Partitionjava.lang.Exception - if initialization fails in any way
protected abstract void doInit()
throws javax.naming.InvalidNameException,
java.lang.Exception
java.lang.Exception
javax.naming.InvalidNameException
public final void destroy()
throws java.lang.Exception
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 Partitionjava.lang.Exception
protected abstract void doDestroy()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isInitialized()
isInitialized in interface Partition
public abstract void sync()
throws java.lang.Exception
sync in interface Partitionjava.lang.Exception - if buffers cannot be flushed to disk
public 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 PartitionentryContext - The context used to pass informations
java.lang.Exception - if there are any problems
public abstract 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 PartitionlookupContext - 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 | |||||||||