|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.directory.server.core.interceptor.BaseInterceptor
org.apache.directory.mitosis.service.ReplicationService
public class ReplicationService
An Interceptor that intercepts LDAP operations and propagates the
changes occurred by the operations into other Replicas so the DIT
of each Replica in the cluster has the same content without any
conflict.
Once an operation is invoked, this interceptor transforms it into one or
more operations that makes the requested operation more proper and robust
for replication. The transformation process is actually just calling a
respective factory method in OperationFactory. The methods in
OperationFactory returns a new Operation instance.
The newly created Operation is used for three purposes.
PartitionNexus
Operation itself to
ReplicationStore so that it can be retrieved later by
ReplicationLogCleanJob and ReplicationClientContextHandler
Replicas via TCP/IP communication
between ReplicationClientContextHandler and
ReplicationServerContextHandler
Operation to ReplicationStore) are performed automatically
when
Operation.execute(PartitionNexus, ReplicationStore, AttributeTypeRegistry)
method is invoked. ReplicationService always call it instead of
forwarding the requested operation to the next Interceptor.
The last action takes place by ReplicationClientContextHandler,
which handles TCP/IP connection managed by ClientConnectionManager.
There are two special attributes in the entries to be replicated:
CSN of the entry. This attribute is
used to compare the incoming operation from other replica is still
valid. If the local entryCSN value is bigger then that of the
incoming operation, it means conflict, and therefore an appropriate
conflict resolution mechanism should get engaged.ReplicationStore by
calling purgeAgedData(), or they will be purged automatically
by periodic manner as you configured with ReplicationConfiguration.
by calling ReplicationConfiguration.setLogMaxAge(int).
Because of this attribute, lookup and search
operations are overrided to ignore entries with entryDeleted
set to true.
| Constructor Summary | |
|---|---|
ReplicationService()
|
|
| Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor |
|---|
addContextPartition, bind, compare, getContext, getMatchedName, getPrincipal, getRootDSE, getSuffix, isSuffix, listSuffixes, removeContextPartition, unbind |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicationService()
| Method Detail |
|---|
public ReplicationConfiguration getConfiguration()
public void setConfiguration(ReplicationConfiguration cfg)
public DirectoryServiceConfiguration getFactoryConfiguration()
public void init(DirectoryServiceConfiguration serviceCfg,
InterceptorConfiguration cfg)
throws javax.naming.NamingException
BaseInterceptor
init in interface Interceptorinit in class BaseInterceptorjavax.naming.NamingExceptionpublic void destroy()
BaseInterceptor
destroy in interface Interceptordestroy in class BaseInterceptorpublic void replicate()
public void purgeAgedData()
throws javax.naming.NamingException
Constants.ENTRY_DELETED is true). This method
should be called periodically to make sure the size of the DIT and
ReplicationStore increase limitlessly.
javax.naming.NamingExceptionReplicationConfiguration.setLogMaxAge(int),
ReplicationLogCleanJob
public void add(NextInterceptor nextInterceptor,
LdapDN normalizedName,
javax.naming.directory.Attributes entry)
throws javax.naming.NamingException
InterceptorPartition.add(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.Attributes) call.
add in interface Interceptoradd in class BaseInterceptorjavax.naming.NamingException
public void delete(NextInterceptor nextInterceptor,
LdapDN name)
throws javax.naming.NamingException
InterceptorPartition.delete(org.apache.directory.shared.ldap.name.LdapDN) call.
delete in interface Interceptordelete in class BaseInterceptorjavax.naming.NamingException
public void modify(NextInterceptor next,
LdapDN name,
int modOp,
javax.naming.directory.Attributes attrs)
throws javax.naming.NamingException
InterceptorPartition.modify(org.apache.directory.shared.ldap.name.LdapDN,int,javax.naming.directory.Attributes) call.
modify in interface Interceptormodify in class BaseInterceptorjavax.naming.NamingException
public void modify(NextInterceptor next,
LdapDN name,
javax.naming.directory.ModificationItem[] items)
throws javax.naming.NamingException
InterceptorPartition.modify(org.apache.directory.shared.ldap.name.LdapDN,javax.naming.directory.ModificationItem[]) call.
modify in interface Interceptormodify in class BaseInterceptorjavax.naming.NamingException
public void modifyRn(NextInterceptor next,
LdapDN oldName,
java.lang.String newRDN,
boolean deleteOldRDN)
throws javax.naming.NamingException
InterceptorPartition.modifyRn(org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
modifyRn in interface InterceptormodifyRn in class BaseInterceptorjavax.naming.NamingException
public void move(NextInterceptor next,
LdapDN oldName,
LdapDN newParentName,
java.lang.String newRDN,
boolean deleteOldRDN)
throws javax.naming.NamingException
InterceptorPartition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN,String,boolean) call.
move in interface Interceptormove in class BaseInterceptorjavax.naming.NamingException
public void move(NextInterceptor next,
LdapDN oldName,
LdapDN newParentName)
throws javax.naming.NamingException
InterceptorPartition.move(org.apache.directory.shared.ldap.name.LdapDN,org.apache.directory.shared.ldap.name.LdapDN) call.
move in interface Interceptormove in class BaseInterceptorjavax.naming.NamingException
public boolean hasEntry(NextInterceptor nextInterceptor,
LdapDN name)
throws javax.naming.NamingException
InterceptorPartition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.
hasEntry in interface InterceptorhasEntry in class BaseInterceptorjavax.naming.NamingException
public javax.naming.directory.Attributes lookup(NextInterceptor nextInterceptor,
LdapDN name)
throws javax.naming.NamingException
InterceptorPartition.lookup(org.apache.directory.shared.ldap.name.LdapDN) call.
lookup in interface Interceptorlookup in class BaseInterceptorjavax.naming.NamingException
public javax.naming.directory.Attributes lookup(NextInterceptor nextInterceptor,
LdapDN name,
java.lang.String[] attrIds)
throws javax.naming.NamingException
InterceptorPartition.lookup(org.apache.directory.shared.ldap.name.LdapDN,String[]) call.
lookup in interface Interceptorlookup in class BaseInterceptorjavax.naming.NamingException
public javax.naming.NamingEnumeration list(NextInterceptor nextInterceptor,
LdapDN baseName)
throws javax.naming.NamingException
InterceptorPartition.list(org.apache.directory.shared.ldap.name.LdapDN) call.
list in interface Interceptorlist in class BaseInterceptorjavax.naming.NamingException
public javax.naming.NamingEnumeration search(NextInterceptor nextInterceptor,
LdapDN baseName,
java.util.Map environment,
ExprNode filter,
javax.naming.directory.SearchControls searchControls)
throws javax.naming.NamingException
InterceptorPartition.search(org.apache.directory.shared.ldap.name.LdapDN,java.util.Map,org.apache.directory.shared.ldap.filter.ExprNode,javax.naming.directory.SearchControls) call.
search in interface Interceptorsearch in class BaseInterceptorjavax.naming.NamingException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||