Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scoja.server.core
Class ClusterSkeleton  view ClusterSkeleton download ClusterSkeleton.java

java.lang.Object
  extended byorg.scoja.server.core.ClusterSkeleton
All Implemented Interfaces:
Cluster, java.lang.Runnable
Direct Known Subclasses:
EventQueue, IterativeCluster

public abstract class ClusterSkeleton
extends java.lang.Object
implements Cluster, java.lang.Runnable


Field Summary
protected  int currentThreadCount
           
static int DEFAULT_THREAD_COUNT
           
protected  boolean isRunning
           
protected  int maxThreadCount
           
protected  boolean stopRequested
           
protected  java.util.Set threads
           
 
Constructor Summary
protected ClusterSkeleton()
           
 
Method Summary
 int getCurrentThreads()
           
 int getThreads()
           
 boolean isRunning()
           
 void setThreads(int max)
           
 void shouldStop()
           
 void start()
           
 void startAllThreads()
           
 void startAnotherThread()
           
 boolean stopRequested()
           
protected  void threadStopped()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

DEFAULT_THREAD_COUNT

public static final int DEFAULT_THREAD_COUNT
See Also:
Constant Field Values

threads

protected final java.util.Set threads

isRunning

protected boolean isRunning

stopRequested

protected boolean stopRequested

maxThreadCount

protected int maxThreadCount

currentThreadCount

protected int currentThreadCount
Constructor Detail

ClusterSkeleton

protected ClusterSkeleton()
Method Detail

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Cluster

start

public void start()
Specified by:
start in interface Cluster

shouldStop

public void shouldStop()
Specified by:
shouldStop in interface Cluster

stopRequested

public boolean stopRequested()
Specified by:
stopRequested in interface Cluster

getThreads

public int getThreads()
Specified by:
getThreads in interface Cluster

setThreads

public void setThreads(int max)
Specified by:
setThreads in interface Cluster

getCurrentThreads

public int getCurrentThreads()
Specified by:
getCurrentThreads in interface Cluster

startAllThreads

public void startAllThreads()

startAnotherThread

public void startAnotherThread()

threadStopped

protected void threadStopped()