public class NetworkClient
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkClient.BatchItem |
static class |
NetworkClient.BatchList |
static class |
NetworkClient.BatchStatus |
static class |
NetworkClient.LogRecord |
static class |
NetworkClient.NodeItem |
static class |
NetworkClient.NodeList |
static class |
NetworkClient.NodeStatus |
static class |
NetworkClient.ResourceRecord |
static class |
NetworkClient.ServerInfo |
static class |
NetworkClient.Status |
static class |
NetworkClient.TaskStatus |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
swigCMemOwn |
| Constructor and Description |
|---|
NetworkClient() |
NetworkClient(long cPtr,
boolean cMemoryOwn) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortBatch(int batch_id)
Abort batch.
|
void |
abortNode(int node_id)
Abort node.
|
boolean |
connect(java.lang.String host,
int port)
Connect to the server.
|
int |
createBatch(java.lang.String path,
NetworkTask[] tasks,
MetaData meta)
Create new batch.
|
void |
delete() |
void |
disconnect()
Disconnect from the server.
|
java.lang.String |
dumpBatches(int[] keys)
Dump current state of batches.
|
protected void |
finalize() |
int |
findBatch(java.lang.String path)
Get batch id based on project path.
|
NetworkClient.BatchList |
getBatchList(long revision)
Get list of batches.
|
NetworkClient.BatchStatus |
getBatchStatus(int batch_id,
long revision)
Get batch status.
|
static long |
getCPtr(NetworkClient obj) |
NetworkClient.NodeList |
getNodeList(long revision)
Get list of nodes.
|
NetworkClient.NodeStatus |
getNodeStatus(int node_id,
long revision)
Get node status.
|
NetworkClient.ServerInfo |
getServerInfo()
Get server information.
|
void |
loadBatches(java.lang.String data)
Load batches from dump.
|
void |
pauseBatch(int batch_id)
Pause batch.
|
void |
pauseNode(int node_id)
Pause node.
|
void |
quitNode(int node_id)
Quit node.
|
void |
resumeBatch(int batch_id)
Resume batch.
|
void |
resumeNode(int node_id)
Resume node.
|
void |
setBatchNodeLimit(int batch_id,
int node_limit)
Set node limit of the batch.
|
void |
setBatchPriority(int batch_id,
int priority)
Set batch priority.
|
void |
setMasterServer(java.lang.String hostname)
Set master server.
|
void |
setNodeCapability(int node_id,
int capability)
Set node capability.
|
void |
setNodeCPUEnable(int node_id,
boolean cpu_enable)
Set node CPU enable flag.
|
void |
setNodeGPUMask(int node_id,
long gpu_mask)
Set node GPU mask.
|
void |
setNodePriority(int node_id,
int priority)
Set node priority.
|
public NetworkClient(long cPtr,
boolean cMemoryOwn)
public NetworkClient()
public static long getCPtr(NetworkClient obj)
protected void finalize()
finalize in class java.lang.Objectpublic void delete()
public boolean connect(java.lang.String host,
int port)
host - Server hostname.port - Communication port.public void disconnect()
public int createBatch(java.lang.String path,
NetworkTask[] tasks,
MetaData meta)
path - Project path relative to root folder.tasks - List of processing tasks to execute.meta - Batch metadata.public int findBatch(java.lang.String path)
path - Project path relative to root folder.public void pauseBatch(int batch_id)
batch_id - Batch id.public void resumeBatch(int batch_id)
batch_id - Batch id.public void abortBatch(int batch_id)
batch_id - Batch id.public void setBatchPriority(int batch_id,
int priority)
batch_id - Batch id.priority - Batch priority (2 - Highest, 1 - High, 0 - Normal, -1 - Low, -2 - Lowest).public void setBatchNodeLimit(int batch_id,
int node_limit)
batch_id - Batch id.node_limit - Node limit of the batch (0 - unlimited).public void pauseNode(int node_id)
node_id - Node id.public void resumeNode(int node_id)
node_id - Node id.public void abortNode(int node_id)
node_id - Node id.public void quitNode(int node_id)
node_id - Node id.public void setNodePriority(int node_id,
int priority)
node_id - Node id.priority - Node priority (2 - Highest, 1 - High, 0 - Normal, -1 - Low, -2 - Lowest).public void setNodeCapability(int node_id,
int capability)
node_id - Node id.capability - Node capability (1 - CPU, 2 - GPU, 3 - Any).public void setNodeGPUMask(int node_id,
long gpu_mask)
node_id - Node id.gpu_mask - GPU device mask.public void setNodeCPUEnable(int node_id,
boolean cpu_enable)
node_id - Node id.cpu_enable - CPU enable flag.public NetworkClient.ServerInfo getServerInfo()
public void setMasterServer(java.lang.String hostname)
public NetworkClient.BatchStatus getBatchStatus(int batch_id, long revision)
batch_id - Batch id.revision - First revision to get.public NetworkClient.NodeStatus getNodeStatus(int node_id, long revision)
node_id - Node id.revision - First revision to get.public NetworkClient.BatchList getBatchList(long revision)
revision - First revision to get.public NetworkClient.NodeList getNodeList(long revision)
revision: - First revision to get.public java.lang.String dumpBatches(int[] keys)
public void loadBatches(java.lang.String data)
data - Batches data.