Class IOThread
- java.lang.Object
-
- com.yahoo.vespa.http.client.core.communication.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IOThread.ConnectionStats
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
GatewayConnection
currentConnection()
For testing.IOThread.ConnectionStats
getConnectionStats()
Returns a snapshot of counters.Endpoint
getEndpoint()
java.util.List<GatewayConnection>
oldConnections()
For testing.void
post(Document document)
For testing onlycom.yahoo.vespa.http.client.core.communication.EndpointResultQueue
resultQueue()
For testingvoid
run()
void
tick()
Do one iteration of work.java.lang.String
toString()
-
-
-
Method Detail
-
getEndpoint
public Endpoint getEndpoint()
-
getConnectionStats
public IOThread.ConnectionStats getConnectionStats()
Returns a snapshot of counters. Threadsafe.
-
close
public void close()
- Specified by:
close
in interfacejava.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 classjava.lang.Object
-
run
public void run()
- Specified by:
run
in interfacejava.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
-
-