Package oracle.kv.pubsub

# Class ShardTimeoutException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.util.concurrent.TimeoutException
oracle.kv.pubsub.ShardTimeoutException

All Implemented Interfaces:
  `Serializable`

public class ShardTimeoutException extends TimeoutException
Exception raised when publisher does not hear from source shard for a given period of time. This exception is only used in calls to `NoSQLSubscriber.onWarn(Throwable)`, which, unlike `NoSQLSubscriber.onError(Throwable)`, intends to raise a warning to subscriber without cancelling ongoing subscription.

See Also:
  - Serialized Form

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getLastMsgTime()`
  Returns the last time we heard from that given shard
  `int`
  `getShardId()`
  Returns Id of the shard that has not been heard from long enough
  `long`
  `getTimeoutMs()`
  Returns the time out of the period the given shard has not been heard.

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getLastMsgTime

    public long getLastMsgTime()
    Returns the last time we heard from that given shard
    Returns:
      the timestamp of the last message

  - ### getTimeoutMs

    public long getTimeoutMs()
    Returns the time out of the period the given shard has not been heard.
    Returns:
      time out limit

  - ### getShardId

    public int getShardId()
    Returns Id of the shard that has not been heard from long enough
    Returns:
      Id of the shard