|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwinstone.cluster.SimpleCluster
public class SimpleCluster
Represents a cluster of winstone containers.
Field Summary | |
---|---|
static WinstoneResourceBundle |
CLUSTER_RESOURCES
|
Constructor Summary | |
---|---|
SimpleCluster(java.util.Map args,
java.lang.Integer controlPort)
Builds a cluster instance |
Method Summary | |
---|---|
WinstoneSession |
askClusterForSession(java.lang.String sessionId,
WebAppConfiguration webAppConfig)
Check if the other nodes in this cluster have a session for this sessionId. |
void |
clusterRequest(byte requestType,
java.io.InputStream in,
java.io.OutputStream out,
java.net.Socket socket,
HostGroup hostGroup)
Accept a control socket request related to the cluster functions and process the request. |
void |
destroy()
Destroy the maintenance thread if there is one. |
void |
handleClusterSessionRequest(java.net.Socket socket,
java.io.InputStream in,
java.io.OutputStream out,
HostGroup hostGroup)
Handles incoming socket requests for session search |
void |
handleNodeHeartBeatRequest(java.net.Socket socket,
java.io.InputStream in)
Handles heartbeats. |
void |
handleNodeListDownloadRequest(java.net.Socket socket,
java.io.InputStream in,
java.io.OutputStream out)
Handles incoming socket requests for cluster node lists. |
void |
run()
Send a heartbeat every now and then, and remove any nodes that haven't responded in 3 heartbeats. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final WinstoneResourceBundle CLUSTER_RESOURCES
Constructor Detail |
---|
public SimpleCluster(java.util.Map args, java.lang.Integer controlPort)
Method Detail |
---|
public void destroy()
Cluster
destroy
in interface Cluster
public void run()
run
in interface java.lang.Runnable
public WinstoneSession askClusterForSession(java.lang.String sessionId, WebAppConfiguration webAppConfig)
askClusterForSession
in interface Cluster
sessionId
- The id of the session to check forwebAppConfig
- The web app that owns the session we want
public void clusterRequest(byte requestType, java.io.InputStream in, java.io.OutputStream out, java.net.Socket socket, HostGroup hostGroup) throws java.io.IOException
clusterRequest
in interface Cluster
requestType
- A byte indicating the request typein
- Socket input streamoutSocket
- output streamwebAppConfig
- Instance of the web app
java.io.IOException
public void handleClusterSessionRequest(java.net.Socket socket, java.io.InputStream in, java.io.OutputStream out, HostGroup hostGroup) throws java.io.IOException
java.io.IOException
public void handleNodeListDownloadRequest(java.net.Socket socket, java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public void handleNodeHeartBeatRequest(java.net.Socket socket, java.io.InputStream in) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |