Package edu.jas.util
Class DistHashTableServer<K>
java.lang.Object
java.lang.Thread
edu.jas.util.DistHashTableServer<K>
- All Implemented Interfaces:
Runnable
Server for the distributed version of a list. TODO: redistribute list for
late coming clients, removal of elements.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ChannelFactory
private static final boolean
static final int
private long
private long
private long
private long
private boolean
private static final org.apache.logging.log4j.Logger
private Thread
protected List
<DHTBroadcaster<K>> protected final SortedMap
<K, DHTTransport> Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new DistHashTableServer.DistHashTableServer
(int port) DistHashTableServer.DistHashTableServer. -
Method Summary
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, yield
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
cf
-
servers
-
goon
private volatile boolean goon -
mythread
-
theList
-
etime
private long etime -
dtime
private long dtime -
ertime
private long ertime -
drtime
private long drtime
-
-
Constructor Details
-
DistHashTableServer
public DistHashTableServer()Constructs a new DistHashTableServer. -
DistHashTableServer
public DistHashTableServer(int port) DistHashTableServer.- Parameters:
port
- to run server on.
-
DistHashTableServer
DistHashTableServer.- Parameters:
cf
- ChannelFactory to use.
-
-
Method Details
-
main
main. Usage: DistHashTableServer <port>- Throws:
InterruptedException
-
init
public void init()thread initialization and start. -
run
public void run()main server method. -
terminate
public void terminate()terminate all servers. -
size
public int size()number of servers. -
toString
toString.
-