|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.ldap.replication.provider.ReplicaEventLog
public class ReplicaEventLog
A structure storing the configuration on each consumer registered on a producer. It stores the following informations :
| Constructor Summary | |
|---|---|
ReplicaEventLog(org.apache.directory.server.core.api.DirectoryService directoryService,
int replicaId)
Creates a new instance of EventLog for a replica |
|
| Method Summary | |
|---|---|
int |
compareTo(ReplicaEventLog o)
|
boolean |
equals(Object obj)
|
ReplicaJournalCursor |
getCursor(String consumerCsn)
|
String |
getHostName()
|
int |
getId()
|
String |
getLastSentCsn()
|
SyncReplSearchListener |
getPersistentListener()
|
String |
getQueueName()
|
org.apache.directory.server.core.api.event.NotificationCriteria |
getSearchCriteria()
|
String |
getSearchFilter()
|
int |
hashCode()
|
boolean |
isDirty()
|
boolean |
isRefreshNPersist()
|
void |
log(ReplicaEventMessage message)
Stores the given message in the queue |
void |
recreate()
Re-create the queue |
void |
setDirty(boolean dirty)
Set the dirty flag |
void |
setHostName(String hostName)
Set the consumer hostname |
void |
setLastSentCsn(String lastSentCsn)
Update the last Sent CSN. |
void |
setPersistentListener(SyncReplSearchListener persistentListener)
Set the listener |
void |
setRefreshNPersist(boolean refreshNPersist)
|
void |
setSearchCriteria(org.apache.directory.server.core.api.event.NotificationCriteria searchCriteria)
Stores the search criteria |
void |
setSearchFilter(String searchFilter)
Set the searchFilter |
void |
stop()
Stop the EventLog |
String |
toString()
|
void |
truncate()
Deletes the queue (to remove the log) and recreates a new queue instance with the same queue name. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicaEventLog(org.apache.directory.server.core.api.DirectoryService directoryService,
int replicaId)
throws IOException
replicaId - The replica ID
IOException| Method Detail |
|---|
public void log(ReplicaEventMessage message)
message - The message to store
public void truncate()
throws Exception
Exception - If the queue can't be deleted
public void recreate()
throws Exception
Exception - If the creation has failed
public void stop()
throws Exception
Exception - If the stop failedpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(ReplicaEventLog o)
compareTo in interface Comparable<ReplicaEventLog>public SyncReplSearchListener getPersistentListener()
public void setPersistentListener(SyncReplSearchListener persistentListener)
persistentListener - The listenerpublic org.apache.directory.server.core.api.event.NotificationCriteria getSearchCriteria()
public void setSearchCriteria(org.apache.directory.server.core.api.event.NotificationCriteria searchCriteria)
searchCriteria - The search criteriapublic boolean isRefreshNPersist()
public void setRefreshNPersist(boolean refreshNPersist)
refreshNPersist - if true, set the EventLog in Refresh and Persist modepublic int getId()
public String getLastSentCsn()
public void setLastSentCsn(String lastSentCsn)
lastSentCsn - The new Sent CSNpublic String getHostName()
public void setHostName(String hostName)
hostName - The consumer hostnamepublic String getSearchFilter()
public void setSearchFilter(String searchFilter)
searchFilter - The searchFilterpublic boolean isDirty()
public void setDirty(boolean dirty)
dirty - The current consumer statuspublic String getQueueName()
public ReplicaJournalCursor getCursor(String consumerCsn)
throws Exception
consumerCsn - the consumer's CSN extracted from cookie
Exception - If the cursor can't be createdpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||