Class RequestTimeoutObserver

java.lang.Object
com.gigaspaces.lrmi.nio.watchdog.RequestTimeoutObserver
Direct Known Subclasses:
RequestResponseTimeoutObserver

public class RequestTimeoutObserver extends Object
RequestTimeoutObserver handles NIO connection timeouts on the client side. If client doesn't receive a reply, it checks the connection with the server and if it is not valid anymore, the connection is closed.
Since:
5.1
Version:
1.0
Author:
anna
  • Field Details

    • _INSPECT_TIMEOUT

      protected static final int _INSPECT_TIMEOUT
    • _logger

      protected static final org.slf4j.Logger _logger
  • Constructor Details

    • RequestTimeoutObserver

      public RequestTimeoutObserver(long requestTimeout)
  • Method Details

    • timeoutOccured

      public void timeoutOccured(Collection<Watchdog.WatchedObject> bucket) throws Exception
      bucket can never be empty
      Throws:
      Exception
      See Also:
      • nio.watchdog.Watchdog#add(Map<WatchedObject, Collection<WatchedObject>>, WatchedObject)
      • nio.watchdog.TimeoutObserver#timeoutOccured(nio.watchdog.Watchdog.WatchedObject)
    • handleOpenSocket

      protected void handleOpenSocket(SocketChannel socketChannel, int watchedObjectLocalPort, long absoluteTimeout, ConnectionResource connectionResource) throws IOException
      Parameters:
      connectionResource - the monitored cpeer
      Throws:
      IOException
    • getValidConnectionMessage

      protected String getValidConnectionMessage(SocketAddress serverAddress)
    • getInvalidConnectionMessage

      protected String getInvalidConnectionMessage(SocketAddress serverAddress, SocketChannel watchedSocketChannel, Watchdog.WatchedObject watched)
    • getFailureToCloseInvalidConnectionMessage

      protected String getFailureToCloseInvalidConnectionMessage(SocketAddress serverAddress, SocketChannel watchedSocketChannel)
    • getLocalAddressString

      protected String getLocalAddressString(SocketChannel socketChannel)
    • getCloseConnectionLoggingLevel

      protected LogLevel getCloseConnectionLoggingLevel()
    • getWatchedObjectInvocationMessage

      protected static String getWatchedObjectInvocationMessage(Watchdog.WatchedObject watched)