Class AbstractIOSessionPool<T>
java.lang.Object
org.apache.hc.core5.reactor.AbstractIOSessionPool<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, ModalCloseable
@Contract(threading=SAFE)
public abstract class AbstractIOSessionPool<T>
extends Object
implements ModalCloseable
- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longfinal voidclose()final voidCloses this process or endpoint and releases any system resources associated with it.final voidClose sessions idle longer than the given period of inactivity.protected abstract voidcloseSession(IOSession ioSession, CloseMode closeMode) connectSession(T namedEndpoint, Timeout connectTimeout, FutureCallback<IOSession> callback) final voidenumAvailable(BiConsumer<T, IOSession> consumer) final voidenumAvailable(Callback<IOSession> callback) Deprecated.final voidEvict expired (closed) sessions.getSession(T endpoint, Timeout connectTimeout, FutureCallback<IOSession> callback) protected booleanTests if the given session has expired.protected booleanTests if the given session is idle.toString()protected voidvalidateSession(IOSession ioSession, Callback<Boolean> callback) Deprecated.protected voidvalidateSession(T endpoint, IOSession ioSession, Callback<Boolean> callback)
-
Constructor Details
-
AbstractIOSessionPool
public AbstractIOSessionPool() -
AbstractIOSessionPool
- Since:
- 5.5
-
-
Method Details
-
connectSession
-
validateSession
Deprecated. -
validateSession
-
closeSession
-
clockMillis
protected long clockMillis()- Since:
- 5.5
-
isIdle
Tests if the given session is idle. This method is expected to be communication protocol aware.- Since:
- 5.5
-
isExpired
-
close
Description copied from interface:ModalCloseableCloses this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.- Specified by:
closein interfaceModalCloseable- Parameters:
closeMode- How to close the receiver.
-
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getSession
-
enumAvailable
Deprecated. -
enumAvailable
- Since:
- 5.5
-
closeIdle
Close sessions idle longer than the given period of inactivity. This method will also Evict closed sessions. -
evictExpired
public final void evictExpired()Evict expired (closed) sessions.- Since:
- 5.5
-
getRoutes
-
toString
-
enumAvailable(BiConsumer).