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
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:
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the last time we heard from that given shardint
Returns Id of the shard that has not been heard from long enoughlong
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
-
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
-