Class IOThread

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Runnable

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

      • getEndpoint

        public Endpoint getEndpoint()
      • close

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

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

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

        public void run()
        Specified by:
        run in interface java.lang.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 java.util.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