org.apache.directory.server.ldap.replication.provider
Class ReplConsumerManager

java.lang.Object
  extended by org.apache.directory.server.ldap.replication.provider.ReplConsumerManager

public class ReplConsumerManager
extends Object

Manage the consumers on the provider : add them, and remove them. All the consumers configuration will be stored in the 'ou=consumers,ou=system' branch.

Author:
Apache Directory Project

Constructor Summary
ReplConsumerManager(DirectoryService directoryService)
          Create a new instance of the producer replication manager.
 
Method Summary
 void addConsumerEntry(ReplicaEventLog replica)
          Add a new consumer entry in ou=consumers,ou=system
 void deleteConsumerEntry(ReplicaEventLog replica)
          Delete an existing consumer entry from ou=consumers,ou=system
 List<ReplicaEventLog> getReplicaEventLogs()
          Get the list of consumers' configuration
 void updateReplicaLastSentCsn(ReplicaEventLog replica)
          Store the new CSN sent by the consumer in place of the previous one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplConsumerManager

public ReplConsumerManager(DirectoryService directoryService)
                    throws Exception
Create a new instance of the producer replication manager.

Parameters:
directoryService - The directoryService instance
Throws:
Exception - if we add an error while creating the configuration
Method Detail

addConsumerEntry

public void addConsumerEntry(ReplicaEventLog replica)
                      throws Exception
Add a new consumer entry in ou=consumers,ou=system

Parameters:
replica - The added consumer replica
Throws:
Exception - If the addition failed

deleteConsumerEntry

public void deleteConsumerEntry(ReplicaEventLog replica)
                         throws Exception
Delete an existing consumer entry from ou=consumers,ou=system

Parameters:
replica - The added consumer replica
Throws:
Exception - If the addition failed

updateReplicaLastSentCsn

public void updateReplicaLastSentCsn(ReplicaEventLog replica)
                              throws Exception
Store the new CSN sent by the consumer in place of the previous one.

Parameters:
replica - The consumer informations
Throws:
Exception - If the update failed

getReplicaEventLogs

public List<ReplicaEventLog> getReplicaEventLogs()
                                          throws Exception
Get the list of consumers' configuration

Returns:
A list of all the consumer configuration stored on the provider
Throws:
Exception - If we had an error while building this list


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.