Class DistributedListServer
java.lang.Object
java.lang.Thread
edu.jas.util.DistributedListServer
- All Implemented Interfaces:
Runnable
Server for the distributed version of a list.
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChannelFactorystatic final intprivate booleanprivate Counterprivate static final org.apache.logging.log4j.Loggerprivate Threadprotected List<Broadcaster> Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new DistributedListServer.DistributedListServer(int port) DistributedListServer.DistributedListServer. -
Method Summary
Methods inherited from class 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
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
cf
-
servers
-
goon
private volatile boolean goon -
mythread
-
listElem
-
theList
-
-
Constructor Details
-
DistributedListServer
public DistributedListServer()Constructs a new DistributedListServer. -
DistributedListServer
public DistributedListServer(int port) DistributedListServer.- Parameters:
port- to run server on.
-
DistributedListServer
DistributedListServer.- Parameters:
cf- ChannelFactory to use.
-
-
Method Details
-
main
main. Usage: DistributedListServer <port>- Throws:
InterruptedException
-
init
public void init()thread initialization and start. -
run
-
terminate
public void terminate()terminate all servers. -
size
public int size()number of servers.
-