public abstract class AbstractPartition extends Object implements Partition
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.Modifier and Type | Field and Description |
---|---|
protected boolean |
initialized
true if and only if this partition is initialized.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractPartition() |
Modifier and Type | Method and Description |
---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, bind, delete, getId, getSchemaManager, getSuffix, getSuffixDn, list, modify, move, moveAndRename, rename, search, setId, setSchemaManager, setSuffix, unbind
protected boolean initialized
public final void initialize() throws 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 Partition
Exception
- if initialization fails in any wayprotected abstract void doInit() throws InvalidNameException, Exception
Exception
InvalidNameException
public final void destroy() throws Exception
doDestroy()
where you have to put your destroy code in,
and clears default properties. Once this method is invoked, isInitialized()
will return false.protected abstract void doDestroy() throws Exception
Exception
public boolean isInitialized()
isInitialized
in interface Partition
public abstract void sync() throws Exception
public boolean hasEntry(EntryOperationContext entryContext) throws 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.public abstract ClonedServerEntry lookup(LookupOperationContext lookupContext) throws Exception
Partition.lookup(LookupOperationContext)
with null attributeIds by default. Please override
this method if there is more effective way for your implementation.Copyright © 2003–2013 The Apache Software Foundation. All rights reserved.