Package com.agisoft.metashape
Class NetworkClient
java.lang.Object
com.agisoft.metashape.NetworkClient
NetworkClient class provides access to the network processing server and allows
to create and manage tasks.
to create and manage tasks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic enumstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabortBatch(int batch_id) Abort batch.voidabortNode(int node_id) Abort node.booleanConnect to the server.intcreateBatch(String path, NetworkTask[] tasks, MetaData meta) Create new batch.voiddelete()voidDisconnect from the server.dumpBatches(int[] keys) Dump current state of batches.
protected voidfinalize()intGet batch id based on project path.getBatchList(long revision) Get list of batches.getBatchStatus(int batch_id, long revision) Get batch status.static longgetCPtr(NetworkClient obj) getNodeList(long revision) Get list of nodes.getNodeStatus(int node_id, long revision) Get node status.Get server information.voidloadBatches(String data) Load batches from dump.voidpauseBatch(int batch_id) Pause batch.voidpauseNode(int node_id) Pause node.voidquitNode(int node_id) Quit node.voidresumeBatch(int batch_id) Resume batch.voidresumeNode(int node_id) Resume node.voidsetBatchNodeLimit(int batch_id, int node_limit) Set node limit of the batch.voidsetBatchPriority(int batch_id, int priority) Set batch priority.voidsetMasterServer(String hostname) Set master server.voidsetNodeCapability(int node_id, int capability) Set node capability.voidsetNodeCPUEnable(int node_id, boolean cpu_enable) Set node CPU enable flag.voidsetNodeGPUMask(int node_id, long gpu_mask) Set node GPU mask.voidsetNodePriority(int node_id, int priority) Set node priority.
-
Field Details
-
swigCMemOwn
protected transient boolean swigCMemOwn
-
-
Constructor Details
-
NetworkClient
public NetworkClient(long cPtr, boolean cMemoryOwn) -
NetworkClient
public NetworkClient()
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize() -
delete
public void delete() -
connect
Connect to the server.- Parameters:
host- Server hostname.port- Communication port.
-
disconnect
public void disconnect()Disconnect from the server. -
createBatch
Create new batch.- Parameters:
path- Project path relative to root folder.tasks- List of processing tasks to execute.meta- Batch metadata.- Returns:
- Batch id.
-
findBatch
Get batch id based on project path.- Parameters:
path- Project path relative to root folder.- Returns:
- Batch id.
-
pauseBatch
public void pauseBatch(int batch_id) Pause batch.- Parameters:
batch_id- Batch id.
-
resumeBatch
public void resumeBatch(int batch_id) Resume batch.- Parameters:
batch_id- Batch id.
-
abortBatch
public void abortBatch(int batch_id) Abort batch.- Parameters:
batch_id- Batch id.
-
setBatchPriority
public void setBatchPriority(int batch_id, int priority) Set batch priority.- Parameters:
batch_id- Batch id.priority- Batch priority (2 - Highest, 1 - High, 0 - Normal, -1 - Low, -2 - Lowest).
-
setBatchNodeLimit
public void setBatchNodeLimit(int batch_id, int node_limit) Set node limit of the batch.- Parameters:
batch_id- Batch id.node_limit- Node limit of the batch (0 - unlimited).
-
pauseNode
public void pauseNode(int node_id) Pause node.- Parameters:
node_id- Node id.
-
resumeNode
public void resumeNode(int node_id) Resume node.- Parameters:
node_id- Node id.
-
abortNode
public void abortNode(int node_id) Abort node.- Parameters:
node_id- Node id.
-
quitNode
public void quitNode(int node_id) Quit node.- Parameters:
node_id- Node id.
-
setNodePriority
public void setNodePriority(int node_id, int priority) Set node priority.- Parameters:
node_id- Node id.priority- Node priority (2 - Highest, 1 - High, 0 - Normal, -1 - Low, -2 - Lowest).
-
setNodeCapability
public void setNodeCapability(int node_id, int capability) Set node capability.- Parameters:
node_id- Node id.capability- Node capability (1 - CPU, 2 - GPU, 3 - Any).
-
setNodeGPUMask
public void setNodeGPUMask(int node_id, long gpu_mask) Set node GPU mask.- Parameters:
node_id- Node id.gpu_mask- GPU device mask.
-
setNodeCPUEnable
public void setNodeCPUEnable(int node_id, boolean cpu_enable) Set node CPU enable flag.- Parameters:
node_id- Node id.cpu_enable- CPU enable flag.
-
getServerInfo
Get server information. -
setMasterServer
Set master server. -
getBatchStatus
Get batch status.- Parameters:
batch_id- Batch id.revision- First revision to get.- Returns:
- Batch status.
-
getNodeStatus
Get node status.- Parameters:
node_id- Node id.revision- First revision to get.- Returns:
- Node status.
-
getBatchList
Get list of batches.- Parameters:
revision- First revision to get.- Returns:
- List of batches.
-
getNodeList
Get list of nodes.- Parameters:
revision- : First revision to get.- Returns:
- List of nodes.
-
dumpBatches
Dump current state of batches.
- Returns:
- Batches data.
-
loadBatches
Load batches from dump.- Parameters:
data- Batches data.
-