com.google.enterprise.adaptor
Class ExceptionHandlers

java.lang.Object
  extended by com.google.enterprise.adaptor.ExceptionHandlers

public class ExceptionHandlers
extends Object

Utility class for ExceptionHandlers.


Method Summary
static ExceptionHandler defaultHandler()
          The default exception handler.
static ExceptionHandler exponentialBackoffHandler(int maximumTries, long initialSleepDuration, TimeUnit initialSleepUnit)
          Create a handler that uses exponential backoff to sleep before retrying.
static ExceptionHandler noRetryHandler()
          Create a handler that always returns false, causing no retries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

defaultHandler

public static ExceptionHandler defaultHandler()
The default exception handler. Currently it is equivalent to exponentialBackoffHandler(12, 5, TimeUnit.SECONDS), but it is free to change in the future.


exponentialBackoffHandler

public static ExceptionHandler exponentialBackoffHandler(int maximumTries,
                                                         long initialSleepDuration,
                                                         TimeUnit initialSleepUnit)
Create a handler that uses exponential backoff to sleep before retrying.


noRetryHandler

public static ExceptionHandler noRetryHandler()
Create a handler that always returns false, causing no retries.