Class NetworkClient

java.lang.Object
com.agisoft.metashape.NetworkClient

public class NetworkClient extends Object
NetworkClient class provides access to the network processing server and allows
to create and manage tasks.
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • NetworkClient

      public NetworkClient(long cPtr, boolean cMemoryOwn)
    • NetworkClient

      public NetworkClient()
  • Method Details

    • getCPtr

      public static long getCPtr(NetworkClient obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • connect

      public boolean connect(String host, int port)
      Connect to the server.
      Parameters:
      host - Server hostname.
      port - Communication port.
    • disconnect

      public void disconnect()
      Disconnect from the server.
    • createBatch

      public int createBatch(String path, NetworkTask[] tasks, MetaData meta)
      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

      public int findBatch(String path)
      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

      public NetworkClient.ServerInfo getServerInfo()
      Get server information.
    • setMasterServer

      public void setMasterServer(String hostname)
      Set master server.
    • getBatchStatus

      public NetworkClient.BatchStatus getBatchStatus(int batch_id, long revision)
      Get batch status.
      Parameters:
      batch_id - Batch id.
      revision - First revision to get.
      Returns:
      Batch status.
    • getNodeStatus

      public NetworkClient.NodeStatus getNodeStatus(int node_id, long revision)
      Get node status.
      Parameters:
      node_id - Node id.
      revision - First revision to get.
      Returns:
      Node status.
    • getBatchList

      public NetworkClient.BatchList getBatchList(long revision)
      Get list of batches.
      Parameters:
      revision - First revision to get.
      Returns:
      List of batches.
    • getNodeList

      public NetworkClient.NodeList getNodeList(long revision)
      Get list of nodes.
      Parameters:
      revision - : First revision to get.
      Returns:
      List of nodes.
    • dumpBatches

      public String dumpBatches(int[] keys)
      Dump current state of batches.

      Returns:
      Batches data.
    • loadBatches

      public void loadBatches(String data)
      Load batches from dump.
      Parameters:
      data - Batches data.