public class ClusterNode extends Object implements TransceiverListener
Constructor and Description |
---|
ClusterNode(NodeParameters params,
TransceiverExceptionListener tel) |
Modifier and Type | Method and Description |
---|---|
void |
addBottler(Bottler bottler) |
void |
addListener(NodeStateListener listener)
Adds a NodeStateListener to the list of listeners that are notified when the state of this
ClusterNode changes.
|
boolean |
cancelJob(long id) |
void |
close() |
void |
fail()
Like close, but indicates that the Cluster encountered a problem.
|
int |
getAvailableRamMB() |
String |
getExecPath() |
String |
getFilePath() |
String |
getHost() |
long |
getID() |
int |
getMaxRamMB() |
NodeParameters |
getParam() |
List<ProcessManager> |
getRunningProcesses() |
ClusterNodeState |
getState() |
int |
getThreadLimit() |
int |
getTotalRamMB() |
String |
getUser() |
void |
handleMessage(ClusterMessage cm) |
boolean |
isReady() |
long |
lastBeat() |
int |
numAvailableThreads() |
int |
numRunningThreads() |
void |
removeListener(NodeStateListener listener) |
void |
setActive(boolean active) |
void |
setExecPath(String path) |
void |
setFilePath(String path) |
void |
setIOStreams(InputStream is,
OutputStream os)
Sets the InputStream and OutputStream used to communicate with the remote compute node.
|
void |
setMessageXC(MessageXC xc) |
protected void |
setState(ClusterNodeState nextState) |
void |
start(NodeShellListener listener) |
static String |
stateString(ClusterNodeState state) |
void |
streamClosed() |
boolean |
submit(ProcessManager<?> process,
ProcessListener listener) |
String |
toString() |
public ClusterNode(NodeParameters params, TransceiverExceptionListener tel)
public void setExecPath(String path)
public void setFilePath(String path)
public void streamClosed()
streamClosed
in interface TransceiverListener
public void setIOStreams(InputStream is, OutputStream os) throws IOException, TimeoutException, InterruptedException
is
- InputStream to receive data from the remote machineos
- OutputStream to send data to the remote machineIOException
- if a problem arises opening one of the streamsTimeoutException
- if we time out while waiting for the remote nodeInterruptedException
- if we are interrupted while waiting for the remote nodepublic void setMessageXC(MessageXC xc)
public String getHost()
public String getUser()
public String getExecPath()
public String getFilePath()
public boolean isReady()
public long getID()
public NodeParameters getParam()
public int numRunningThreads()
public int numAvailableThreads()
public int getThreadLimit()
public void setActive(boolean active)
public boolean submit(ProcessManager<?> process, ProcessListener listener)
public long lastBeat()
public void handleMessage(ClusterMessage cm)
handleMessage
in interface TransceiverListener
public int getMaxRamMB()
public int getAvailableRamMB()
public int getTotalRamMB()
public void fail()
public void close()
public static String stateString(ClusterNodeState state)
protected void setState(ClusterNodeState nextState)
public boolean cancelJob(long id)
public List<ProcessManager> getRunningProcesses()
public void addListener(NodeStateListener listener)
listener
- a NodeStateListener to register with the ClusterNodepublic void addBottler(Bottler bottler)
public void removeListener(NodeStateListener listener)
public ClusterNodeState getState()
public void start(NodeShellListener listener) throws ShellExecutionException
ShellExecutionException
Copyright © 2015–2021 Fiji. All rights reserved.