net.netheos.pcsapi.exceptions
Class CRetriableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.netheos.pcsapi.exceptions.CStorageException
                  extended by net.netheos.pcsapi.exceptions.CRetriableException
All Implemented Interfaces:
Serializable

public class CRetriableException
extends CStorageException

Thrown by RequestInvoker validation method, when request has failed but should be retried.

This class is only a marker ; the underlying root exception is given by the 'cause' attribute. The optional 'delay' specifies how much one should wait before retrying

See Also:
Serialized Form

Constructor Summary
CRetriableException(Throwable cause)
           
CRetriableException(Throwable cause, long delay)
          Build a CRetriableException and tell engine to wait the specified amount of time.
 
Method Summary
 long getDelay()
          Get the delay before retrying the request
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CRetriableException

public CRetriableException(Throwable cause)

CRetriableException

public CRetriableException(Throwable cause,
                           long delay)
Build a CRetriableException and tell engine to wait the specified amount of time.

Parameters:
cause -
delay - if < 0, delay is unspecified
Method Detail

getDelay

public long getDelay()
Get the delay before retrying the request

Returns:
The delay in millis (if negative, no delay is specified).


Copyright © 2014. All Rights Reserved.