Module convex.peer
Package convex.peer

Class AThreadedComponent

java.lang.Object
convex.peer.AThreadedComponent
Direct Known Subclasses:
BeliefPropagator, ConnectionManager, CVMExecutor, QueryHandler, TransactionHandler

public abstract class AThreadedComponent extends Object
Base class for a threaded execution component that runs within the context of a Peer Server
  • Field Details

    • server

      protected final Server server
    • thread

      protected final Thread thread
  • Constructor Details

    • AThreadedComponent

      protected AThreadedComponent(Server server)
  • Method Details

    • getLoad

      public double getLoad()
    • loop

      protected abstract void loop() throws InterruptedException
      Throws:
      InterruptedException
    • getThreadName

      protected abstract String getThreadName()
    • start

      public void start()
      Start the threaded component
    • close

      public void close()
      Close this threaded component, including interrupting any running thread(s). Subclasses may override, but should call `super.close()` to close the main thread