| java.lang.Object winstone.cluster.SimpleCluster
SimpleCluster | public class SimpleCluster implements Runnable,Cluster(Code) | | Represents a cluster of winstone containers.
author: Rick Knowles version: $Id: SimpleCluster.java,v 1.8 2006/08/10 06:38:31 rickknowles Exp $ |
Method Summary | |
public WinstoneSession | askClusterForSession(String sessionId, WebAppConfiguration webAppConfig) Check if the other nodes in this cluster have a session for this
sessionId. | public void | clusterRequest(byte requestType, InputStream in, OutputStream out, Socket socket, HostGroup hostGroup) Accept a control socket request related to the cluster functions and
process the request. | public void | destroy() | public void | handleClusterSessionRequest(Socket socket, InputStream in, OutputStream out, HostGroup hostGroup) | public void | handleNodeHeartBeatRequest(Socket socket, InputStream in) Handles heartbeats. | public void | handleNodeListDownloadRequest(Socket socket, InputStream in, OutputStream out) Handles incoming socket requests for cluster node lists. | public void | run() Send a heartbeat every now and then, and remove any nodes that haven't
responded in 3 heartbeats. |
HEARTBEAT_PERIOD | final int HEARTBEAT_PERIOD(Code) | | |
MAX_NO_OF_MISSING_HEARTBEATS | final int MAX_NO_OF_MISSING_HEARTBEATS(Code) | | |
NODELIST_DOWNLOAD_TYPE | final byte NODELIST_DOWNLOAD_TYPE(Code) | | |
NODE_HEARTBEAT_TYPE | final byte NODE_HEARTBEAT_TYPE(Code) | | |
SESSION_CHECK_TIMEOUT | final int SESSION_CHECK_TIMEOUT(Code) | | |
SimpleCluster | public SimpleCluster(Map args, Integer controlPort)(Code) | | Builds a cluster instance
|
askClusterForSession | public WinstoneSession askClusterForSession(String sessionId, WebAppConfiguration webAppConfig)(Code) | | Check if the other nodes in this cluster have a session for this
sessionId.
Parameters: sessionId - The id of the session to check for A valid session instance |
clusterRequest | public void clusterRequest(byte requestType, InputStream in, OutputStream out, Socket socket, HostGroup hostGroup) throws IOException(Code) | | Accept a control socket request related to the cluster functions and
process the request.
Parameters: requestType - A byte indicating the request type Parameters: in - Socket input stream Parameters: outSocket - output stream Parameters: webAppConfig - Instance of the web app throws: IOException - |
destroy | public void destroy()(Code) | | |
handleNodeHeartBeatRequest | public void handleNodeHeartBeatRequest(Socket socket, InputStream in) throws IOException(Code) | | Handles heartbeats. Just updates the date of this node's last heartbeat
|
run | public void run()(Code) | | Send a heartbeat every now and then, and remove any nodes that haven't
responded in 3 heartbeats.
|
|
|