org.opends.server.replication.server
Class ServerReader

java.lang.Object
  extended by java.lang.Thread
      extended by org.opends.server.api.DirectoryThread
          extended by org.opends.server.replication.server.ServerReader
All Implemented Interfaces:
java.lang.Runnable

public class ServerReader
extends DirectoryThread

This class implement the part of the replicationServer that is reading the connection from the LDAP servers to get all the updates that were done on this replica and forward them to other servers. A single thread is dedicated to this work. It waits in a blocking mode on the connection from the LDAP server and upon receiving an update puts in into the replicationServer cache from where the other servers will grab 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
ServerReader(ProtocolSession session, short serverId, ServerHandler handler, ReplicationServerDomain replicationServerDomain)
          Constructor for the LDAP server reader part of the replicationServer.
 
Method Summary
 void run()
          Create a loop that reads changes and hands them off to be processed.
 
Methods inherited from class org.opends.server.api.DirectoryThread
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerReader

public ServerReader(ProtocolSession session,
                    short serverId,
                    ServerHandler handler,
                    ReplicationServerDomain replicationServerDomain)
Constructor for the LDAP server reader part of the replicationServer.

Parameters:
session - The ProtocolSession from which to read the data.
serverId - The server ID of the server from which we read messages.
handler - The server handler for this server reader.
replicationServerDomain - The ReplicationServerDomain for this server reader.
Method Detail

run

public void run()
Create a loop that reads changes and hands them off to be processed.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread