|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.api.MonitorProvider<MonitorProviderCfg>
org.opends.server.replication.server.ReplicationServer
public class ReplicationServer
ReplicationServer Listener. This singleton is the main object of the replication server It waits for the incoming connections and create listener and publisher objects for connection with LDAP servers and with replication servers It is responsible for creating the replication server replicationServerDomain and managing it
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ReplicationServer(ReplicationServerCfg configuration)
Creates a new Replication server using the provided configuration entry. |
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(ReplicationServerCfg configuration)
Applies the configuration changes to this change listener. |
void |
clearDb()
Clears the Db associated with that server. |
void |
clearGenerationId(DN baseDn)
Clears the generationId for the replicationServerDomain related to the provided baseDn. |
java.util.Iterator<ReplicationServerDomain> |
getCacheIterator()
Returns an iterator on the list of replicationServerDomain. |
long |
getGenerationId(DN baseDN)
Get the value of generationId for the replication replicationServerDomain associated with the provided baseDN. |
java.util.ArrayList<Attribute> |
getMonitorData()
Retrieves a set of attributes containing monitor data that should be returned to the client if the corresponding monitor entry is requested. |
java.lang.String |
getMonitorInstanceName()
Retrieves the name of this monitor provider. |
ReplicationServerDomain |
getReplicationServerDomain(DN baseDn,
boolean create)
Get the ReplicationServerDomain associated to the base DN given in parameter. |
short |
getServerId()
Get the serverId for this replication server. |
long |
getUpdateInterval()
Retrieves the length of time in milliseconds that should elapse between calls to the updateMonitorData method. |
void |
initializeMonitorProvider(MonitorProviderCfg configuraiton)
Initializes this monitor provider based on the information in the provided configuration entry. |
static boolean |
isConfigurationAcceptable(ReplicationServerCfg configuration,
java.util.List<Message> unacceptableReasons)
Check if the provided configuration is acceptable for add. |
boolean |
isConfigurationChangeAcceptable(ReplicationServerCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
DbHandler |
newDbHandler(short id,
DN baseDn)
Creates a new DB handler for this ReplicationServer and the serverId and DN given in parameter. |
void |
processBackupBegin(Backend backend,
BackupConfig config)
Performs any processing that might be necessary just before the server begins processing on a backup task. |
void |
processBackupEnd(Backend backend,
BackupConfig config,
boolean successful)
Performs any processing that might be necessary after the server has completed processing on a backup task. |
void |
processExportBegin(Backend backend,
LDIFExportConfig config)
Performs any processing that might be necessary just before the server begins processing on an LDIF export task. |
void |
processExportEnd(Backend backend,
LDIFExportConfig config,
boolean successful)
Performs any processing that might be necessary after the server has completed processing on an LDIF export task. |
void |
processImportBegin(Backend backend,
LDIFImportConfig config)
Performs any processing that might be necessary just before the server begins processing on an LDIF import task. |
void |
processImportEnd(Backend backend,
LDIFImportConfig config,
boolean successful)
Performs any processing that might be necessary after the server has completed processing on an LDIF import task. |
void |
processRestoreBegin(Backend backend,
RestoreConfig config)
Performs any processing that might be necessary just before the server begins processing on a restore task. |
void |
processRestoreEnd(Backend backend,
RestoreConfig config,
boolean successful)
Performs any processing that might be necessary after the server has completed processing on a restore task. |
void |
remove()
Do what needed when the config object related to this replication server is deleted from the server configuration. |
protected void |
removeBackend()
Removes the backend associated to this Replication Server that has been created when this replication server was created. |
void |
shutdown()
Shutdown the Replication Server service and all its connections. |
void |
updateMonitorData()
Performs any processing periodic processing that may be desired to update the information associated with this monitor. |
Methods inherited from class org.opends.server.api.MonitorProvider |
---|
finalizeMonitorProvider, getMonitorObjectClass, isConfigurationAcceptable, run |
Methods inherited from class org.opends.server.api.DirectoryThread |
---|
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
---|
run |
Constructor Detail |
---|
public ReplicationServer(ReplicationServerCfg configuration) throws ConfigException
configuration
- The configuration of this replication server.
ConfigException
- When Configuration is invalid.Method Detail |
---|
public ReplicationServerDomain getReplicationServerDomain(DN baseDn, boolean create)
baseDn
- The base Dn for which the ReplicationServerDomain must be
returned.create
- Specifies whether to create the ReplicationServerDomain if
it does not already exist.
public void shutdown()
public DbHandler newDbHandler(short id, DN baseDn) throws com.sleepycat.je.DatabaseException
id
- The serverId for which the dbHandler must be created.baseDn
- The DN for which the dbHandler muste be created.
com.sleepycat.je.DatabaseException
- in case of underlying database problem.public void clearGenerationId(DN baseDn) throws com.sleepycat.je.DatabaseException
baseDn
- The baseDn for which to delete the generationId.
com.sleepycat.je.DatabaseException
- When it occurs.public static boolean isConfigurationAcceptable(ReplicationServerCfg configuration, java.util.List<Message> unacceptableReasons)
configuration
- The configuration to check.unacceptableReasons
- When the configuration is not acceptable, this
table is use to return the reasons why this
configuration is not acceptbale.
public ConfigChangeResult applyConfigurationChange(ReplicationServerCfg configuration)
applyConfigurationChange
in interface ConfigurationChangeListener<ReplicationServerCfg>
configuration
- The new configuration containing the changes.
public boolean isConfigurationChangeAcceptable(ReplicationServerCfg configuration, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<ReplicationServerCfg>
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed change is
acceptable, or false
if it is not.public void initializeMonitorProvider(MonitorProviderCfg configuraiton)
initializeMonitorProvider
in class MonitorProvider<MonitorProviderCfg>
configuraiton
- The configuration to use to initialize
this monitor provider.public java.lang.String getMonitorInstanceName()
getMonitorInstanceName
in class MonitorProvider<MonitorProviderCfg>
public long getUpdateInterval()
updateMonitorData
method. A
negative or zero return value indicates that the
updateMonitorData
method should not be periodically
invoked.
getUpdateInterval
in class MonitorProvider<MonitorProviderCfg>
updateMonitorData()
method.public void updateMonitorData()
getUpdateInterval
milliseconds apart,
but no guarantees will be made.
updateMonitorData
in class MonitorProvider<MonitorProviderCfg>
public java.util.ArrayList<Attribute> getMonitorData()
getMonitorData
in class MonitorProvider<MonitorProviderCfg>
public long getGenerationId(DN baseDN)
baseDN
- The baseDN of the replicationServerDomain.
public short getServerId()
public void remove()
protected void removeBackend()
public void processBackupBegin(Backend backend, BackupConfig config)
processBackupBegin
in interface BackupTaskListener
backend
- The backend to be archived.config
- Configuration information about the backup to be
performed.public void processBackupEnd(Backend backend, BackupConfig config, boolean successful)
processBackupEnd
in interface BackupTaskListener
backend
- The backend that was archived.config
- Configuration information about the backup
that was performed.successful
- Indicates whether the backup operation
completed successfully.public void processRestoreBegin(Backend backend, RestoreConfig config)
processRestoreBegin
in interface RestoreTaskListener
backend
- The backend to be restored.config
- Configuration information about the restore to
be performed.public void processRestoreEnd(Backend backend, RestoreConfig config, boolean successful)
processRestoreEnd
in interface RestoreTaskListener
backend
- The backend that was restored.config
- Configuration information about the restore
that was performed.successful
- Indicates whether the restore operation
completed successfully.public void processImportBegin(Backend backend, LDIFImportConfig config)
processImportBegin
in interface ImportTaskListener
backend
- The backend to be imported.config
- Configuration information about the LDIF import
to be performed.public void processImportEnd(Backend backend, LDIFImportConfig config, boolean successful)
processImportEnd
in interface ImportTaskListener
backend
- The backend that was imported.config
- Configuration information about the LDIF
import that was performed.successful
- Indicates whether the import operation
completed successfully.public void processExportBegin(Backend backend, LDIFExportConfig config)
processExportBegin
in interface ExportTaskListener
backend
- The backend to be exported.config
- Configuration information about the LDIF export
to be performed.public void processExportEnd(Backend backend, LDIFExportConfig config, boolean successful)
processExportEnd
in interface ExportTaskListener
backend
- The backend that was exported.config
- Configuration information about the LDIF
export that was performed.successful
- Indicates whether the export operation
completed successfully.public java.util.Iterator<ReplicationServerDomain> getCacheIterator()
public void clearDb()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |