Class ProcessStatus

java.lang.Object
utils.communication.groupConstitution.Process
utils.communication.groupConstitution.ProcessStatus
All Implemented Interfaces:
ProcessInterface, Closeable, AutoCloseable, AsynchronousChannel, Channel

public final class ProcessStatus extends Process
  • Constructor Details

    • ProcessStatus

      public ProcessStatus(Process process)
    • ProcessStatus

      public ProcessStatus(ProcessStatus processStatus)
  • Method Details

    • process

      public Process process()
    • isCompleted

      public boolean isCompleted()
    • isActive

      public boolean isActive()
    • setActive

      public void setActive(boolean active)
    • getvOnCompletion

      public org.javatuples.Pair<Double,Integer> getvOnCompletion()
    • isOther

      public boolean isOther()
      Description copied from interface: ProcessInterface
      Whether this GroupMember represents another process or ourselves.
      Specified by:
      isOther in interface ProcessInterface
      Overrides:
      isOther in class Process
      Returns:
      True if it is not the calling process, false otherwise
    • complete

      public void complete(double vOnCompletion, int completionRound)
    • reset

      public void reset()
    • safeWrite

      public <T> void safeWrite(ByteBuffer bf, T attachment, CompletionHandler<Integer,? super T> handler)
      Description copied from interface: ProcessInterface
      Asynchronous thread-safe write method. Guarantees no WritePendingException occurs. Does nothing in the case that isOther is false.
      Specified by:
      safeWrite in interface ProcessInterface
      Overrides:
      safeWrite in class Process
      Type Parameters:
      T - Type of attachment
      Parameters:
      bf - The buffer from which bytes are to be transferred
      attachment - The object to attach to the I/O operation
      handler - The handler for consuming the result
    • safeRead

      public <T> void safeRead(ByteBuffer bf, T attachment, CompletionHandler<Integer,? super T> handler)
      Description copied from interface: ProcessInterface
      Asynchronous thread-safe read method. Does nothing in the case that isOther is false.
      Specified by:
      safeRead in interface ProcessInterface
      Overrides:
      safeRead in class Process
      Type Parameters:
      T - Type of attachment
      Parameters:
      bf - The buffer to which bytes are to be transferred
      attachment - The object to attach to the I/O operation
      handler - The handler for consuming the result