public final class LDAPReplicationDomain extends ReplicationDomain implements org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.ReplicationDomainCfg>, AlertGenerator, LocalBackendInitializationListener, ServerShutdownListener
FIXME Move this class to org.opends.server.replication.service or the equivalent package once this code is moved to a maven module.
ReplicationDomain.ImportExportContext
Modifier and Type | Field and Description |
---|---|
static String |
DS_SYNC_CONFLICT
The attribute used to mark conflicting entries.
|
broker, config, generationId
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalMonitoring(MonitorData attributes)
Subclasses should use this method to add additional monitoring information
in the ReplicationDomain.
|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.ReplicationDomainCfg configuration) |
long |
countEntries()
This method should return the total number of objects in the
replicated domain.
|
int |
decodeSource(String sourceString)
Verifies that the given string represents a valid source
from which this server can be initialized.
|
void |
disable()
Disable the replication on this domain.
|
void |
enable()
Enable back the domain after a previous disable.
|
protected void |
exportBackend(OutputStream output)
This method trigger an export of the replicated data.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator
may produce.
|
String |
getClassName()
Retrieves the fully-qualified name of the Java class for this
alert generator implementation.
|
org.forgerock.opendj.ldap.Dn |
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert
generator is associated.
|
String |
getShutdownListenerName()
Retrieves the human-readable name for this shutdown listener.
|
protected void |
importBackend(InputStream input)
This method triggers an import of the replicated data.
|
protected void |
initializeRemote(int target,
int requestorID,
Task initTask,
int initWindow)
This is overwritten to allow stopping the (online) export process if the
local domain is fractional and the destination is all other servers:
This make no sense to have only fractional servers in a replicated
topology.
|
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.ReplicationDomainCfg configuration,
List<LocalizableMessage> unacceptableReasons) |
void |
performBackendPostFinalizationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend
is finalized.
|
void |
performBackendPostInitializationProcessing(LocalBackend<?> backend)
Performs any processing that may be required
after the Initialisation cycle has been completed, that is
all listeners have received the initialisation event, and the
backend has been put into service,.
|
void |
performBackendPreFinalizationProcessing(LocalBackend<?> backend)
Performs any processing that may be required before starting
the finalisation cycle, that is invoked before any listener receive
the Finalization event.
|
void |
performBackendPreInitializationProcessing(LocalBackend<?> backend)
Performs any processing that may be required whenever a backend
is initialized for use in the Directory Server.
|
void |
processServerShutdown(LocalizableMessage reason)
Indicates that the Directory Server has received a request to
stop running and that this shutdown listener should take any
action necessary to prepare for it.
|
boolean |
processUpdate(UpdateMsg updateMsg)
This method should handle the processing of
UpdateMsg receive from
remote replication entities. |
void |
publishReplicaOfflineMsg()
Publishes a replica offline message if all pending changes for current
replica have been sent out.
|
void |
purgeConflictsHistorical(PurgeConflictsHistoricalTask task,
long endDate)
Check and purge the historical attribute on all eligible entries under this domain.
|
protected byte[] |
receiveEntryBytes()
This is overwritten to allow stopping the (online) import process by the
fractional ldif import plugin when it detects that the (imported) remote
data set is not consistent with the local fractional configuration.
|
static LDAPReplicationDomain |
retrievesReplicationDomain(org.forgerock.opendj.ldap.Dn baseDN)
Retrieves a replication domain based on the baseDN.
|
void |
sessionInitiated(ServerStatus initStatus,
ServerState rsState)
Set the initial status of the domain and perform necessary initializations.
|
void |
shutdown()
Shutdown this ReplicationDomain.
|
void |
start()
Starts the Replication Domain.
|
changeConfig, changeConfig, decodeTarget, disableService, enableService, getAssuredMode, getAssuredSdAcknowledgedUpdates, getAssuredSdLevel, getAssuredSdSentUpdates, getAssuredSdServerTimeoutUpdates, getAssuredSdTimeoutUpdates, getAssuredSrAcknowledgedUpdates, getAssuredSrNotAcknowledgedUpdates, getAssuredSrReceivedUpdates, getAssuredSrReceivedUpdatesAcked, getAssuredSrReceivedUpdatesNotAcked, getAssuredSrReplayErrorUpdates, getAssuredSrSentUpdates, getAssuredSrServerNotAcknowledgedUpdates, getAssuredSrTimeoutUpdates, getAssuredSrWrongStatusUpdates, getAssuredTimeout, getBaseDN, getEclIncludes, getEclIncludesForDeletes, getGenerationID, getGenerator, getGroupId, getImportExportContext, getLastLocalChange, getLastStatusChangeDate, getRefUrls, getReplicaInfos, getReplicaStates, getReplicationServer, getRsInfos, getRsServerId, getServerId, getServerState, getStatus, hasConnectionError, ieRunning, initializeFromRemote, initializeRemote, isAssured, isConnected, isListenerShuttingDown, prepareWaitForAckIfAssuredEnabled, processUpdateDone, publish, readAssuredConfig, resetGenerationId, setEclIncludes, setGenerationID, signalNewStatus, startListenService, startPublishService, toString, waitForAckIfAssuredEnabled
public static final String DS_SYNC_CONFLICT
public String getShutdownListenerName()
ServerShutdownListener
getShutdownListenerName
in interface ServerShutdownListener
public void processServerShutdown(LocalizableMessage reason)
ServerShutdownListener
processServerShutdown
in interface ServerShutdownListener
reason
- The human-readable reason for the shutdown.public void performBackendPreInitializationProcessing(LocalBackend<?> backend)
LocalBackendInitializationListener
performBackendPreInitializationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that has been initialized and is
about to be put into service.public void performBackendPostFinalizationProcessing(LocalBackend<?> backend)
LocalBackendInitializationListener
performBackendPostFinalizationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that has been taken out of service
and is about to be finalized.public void performBackendPostInitializationProcessing(LocalBackend<?> backend)
LocalBackendInitializationListener
performBackendPostInitializationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that has been initialized and has been
put into service.public void performBackendPreFinalizationProcessing(LocalBackend<?> backend)
LocalBackendInitializationListener
performBackendPreFinalizationProcessing
in interface LocalBackendInitializationListener
backend
- The backend that is about to be finalized.protected byte[] receiveEntryBytes()
receiveEntryBytes
in class ReplicationDomain
protected void initializeRemote(int target, int requestorID, Task initTask, int initWindow) throws DirectoryException
initializeRemote
in class ReplicationDomain
target
- The target server that should be initialized.requestorID
- The server that initiated the export. It can
be the serverID of this server, or the serverID of a remote server.initTask
- The task in this server that triggers this initialization
and that should be updated with its progress. Null when the export is done
following a request coming from a remote server (task is remote).initWindow
- The value of the initialization window for flow control
between the importer and the exporter.DirectoryException
- When an error occurs. No exception raised
means success.public void publishReplicaOfflineMsg()
ReplicationDomain
publishReplicaOfflineMsg
in class ReplicationDomain
public void shutdown()
public void disable()
public void enable()
protected void exportBackend(OutputStream output) throws DirectoryException
exportBackend
in class ReplicationDomain
output
- The OutputStream where the export should
be produced.DirectoryException
- When needed.protected void importBackend(InputStream input) throws DirectoryException
importBackend
in class ReplicationDomain
input
- The InputStream from which the data are read.DirectoryException
- When needed.public static LDAPReplicationDomain retrievesReplicationDomain(org.forgerock.opendj.ldap.Dn baseDN) throws DirectoryException
baseDN
- The baseDN of the domain to retrieveDirectoryException
- When an error occurred or no domain
match the provided baseDN.public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.ReplicationDomainCfg configuration)
applyConfigurationChange
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.ReplicationDomainCfg>
public boolean isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.ReplicationDomainCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.ReplicationDomainCfg>
public Map<String,String> getAlerts()
AlertGenerator
getAlerts
in interface AlertGenerator
public String getClassName()
AlertGenerator
getClassName
in interface AlertGenerator
public org.forgerock.opendj.ldap.Dn getComponentEntryDN()
AlertGenerator
getComponentEntryDN
in interface AlertGenerator
public void start()
public void sessionInitiated(ServerStatus initStatus, ServerState rsState)
ReplicationDomain
sessionInitiated
in class ReplicationDomain
initStatus
- The status to enter the state machine with.rsState
- The ServerState of the ReplicationServer
with which the session was established.public long countEntries() throws DirectoryException
countEntries
in class ReplicationDomain
DirectoryException
- when needed.public boolean processUpdate(UpdateMsg updateMsg)
ReplicationDomain
UpdateMsg
receive from
remote replication entities.
This method will be called by a single thread and should therefore should not be blocking.
processUpdate
in class ReplicationDomain
updateMsg
- The UpdateMsg
that was received. true
is returned, no further processing is
necessary. If false
is returned, the subclass should
call the method ReplicationDomain.processUpdateDone(UpdateMsg, String)
and
update the ServerState When this processing is complete.public void addAdditionalMonitoring(MonitorData attributes)
ReplicationDomain
addAdditionalMonitoring
in class ReplicationDomain
attributes
- where to additional monitoring attributespublic int decodeSource(String sourceString) throws DirectoryException
sourceString
- The string representing the sourceDirectoryException
- if the string is not validpublic void purgeConflictsHistorical(PurgeConflictsHistoricalTask task, long endDate) throws DirectoryException
task
- the task raising this purge.endDate
- the date to stop this task whether the job is done or not.DirectoryException
- when an exception happens.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.