Class AbstractIOSessionPool<T>

    • Constructor Detail

      • AbstractIOSessionPool

        public AbstractIOSessionPool()
      • AbstractIOSessionPool

        public AbstractIOSessionPool​(java.time.Clock clock)
        Since:
        5.5
    • Method Detail

      • validateSession

        protected void validateSession​(T endpoint,
                                       IOSession ioSession,
                                       Callback<java.lang.Boolean> callback)
        Since:
        5.5
      • closeSession

        protected abstract void closeSession​(IOSession ioSession,
                                             CloseMode closeMode)
      • clockMillis

        protected long clockMillis()
        Since:
        5.5
      • isIdle

        protected boolean isIdle​(IOSession session)
        Tests if the given session is idle. This method is expected to be communication protocol aware.
        Since:
        5.5
      • isExpired

        protected boolean isExpired​(T endpoint,
                                    IOSession session)
        Tests if the given session has expired. This method is expected to be communication protocol aware.
        Since:
        5.5
      • close

        public final void close​(CloseMode closeMode)
        Description copied from interface: ModalCloseable
        Closes 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:
        close in interface ModalCloseable
        Parameters:
        closeMode - How to close the receiver.
      • close

        public final void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • enumAvailable

        public final void enumAvailable​(java.util.function.BiConsumer<T,​IOSession> consumer)
        Since:
        5.5
      • closeIdle

        public final void closeIdle​(TimeValue inactivityTime)
        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

        public final java.util.Set<T> getRoutes()
      • toString

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