public class ReplicaEventLog extends Object implements Comparable<ReplicaEventLog>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_IDLE_PERIOD
The max delay for an idle replication log with no activity
|
static int |
DEFAULT_PURGE_THRESHOLD_COUNT |
static String |
REPLICA_EVENT_LOG_NAME_PREFIX |
| Constructor and Description |
|---|
ReplicaEventLog(org.apache.directory.server.core.api.DirectoryService directoryService,
int replicaId)
Creates a new instance of EventLog for a replica
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ReplicaEventLog o) |
int |
count() |
boolean |
equals(Object obj) |
org.apache.directory.api.ldap.model.name.Dn |
getConsumerEntryDn() |
ReplicaJournalCursor |
getCursor(String consumerCsn) |
String |
getHostName() |
int |
getId() |
String |
getLastSentCsn() |
long |
getMaxIdlePeriod() |
String |
getName() |
SyncReplSearchListener |
getPersistentListener() |
int |
getPurgeThresholdCount() |
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 |
setConsumerEntryDn(org.apache.directory.api.ldap.model.name.Dn consumerEntryDn) |
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 |
setMaxIdlePeriod(long maxIdlePeriod) |
void |
setPersistentListener(SyncReplSearchListener persistentListener)
Set the listener
|
void |
setPurgeThresholdCount(int purgeThresholdCount) |
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.
|
public static final String REPLICA_EVENT_LOG_NAME_PREFIX
public static final int DEFAULT_PURGE_THRESHOLD_COUNT
public static final int DEFAULT_MAX_IDLE_PERIOD
public ReplicaEventLog(org.apache.directory.server.core.api.DirectoryService directoryService,
int replicaId)
throws IOException
directoryService - The DirectoryService instancereplicaId - The replica IDIOExceptionpublic void log(ReplicaEventMessage message)
message - The message to storepublic void truncate()
throws Exception
Exception - If the queue can't be deletedpublic void recreate()
throws Exception
Exception - If the creation has failedpublic 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 cookieException - If the cursor can't be createdpublic String getName()
public int count()
public long getMaxIdlePeriod()
public void setMaxIdlePeriod(long maxIdlePeriod)
public int getPurgeThresholdCount()
public void setPurgeThresholdCount(int purgeThresholdCount)
public org.apache.directory.api.ldap.model.name.Dn getConsumerEntryDn()
public void setConsumerEntryDn(org.apache.directory.api.ldap.model.name.Dn consumerEntryDn)
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.