java.lang.Object
com.yahoo.vespa.http.client.core.communication.IOThread
All Implemented Interfaces:
AutoCloseable, Runnable

public class IOThread extends Object implements Runnable, AutoCloseable
Thread which feeds document operations asynchronously and processes the results.
Author:
Einar M R Rosenvinge
  • Method Details

    • getEndpoint

      public Endpoint getEndpoint()
    • getConnectionStats

      public IOThread.ConnectionStats getConnectionStats()
      Returns a snapshot of counters. Threadsafe.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • post

      public void post(Document document) throws InterruptedException
      For testing only
      Throws:
      InterruptedException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • tick

      public void tick()
      Do one iteration of work. Should be called from the single worker thread of this.
    • currentConnection

      public GatewayConnection currentConnection()
      For testing. Returns the current connection of this. Not thread safe.
    • oldConnections

      public List<GatewayConnection> oldConnections()
      For testing. Returns a snapshot of the old connections of this.
    • resultQueue

      public com.yahoo.vespa.http.client.core.communication.EndpointResultQueue resultQueue()
      For testing