org.multiverse.api.backoff
Class NoOpBackoffPolicy
java.lang.Object
org.multiverse.api.backoff.NoOpBackoffPolicy
- All Implemented Interfaces:
- BackoffPolicy
public final class NoOpBackoffPolicy
- extends java.lang.Object
- implements BackoffPolicy
A BackoffPolicy that does not backoff. This implementation
is useful a BackoffPolicy instance is needed, but no delay should be done. It is unlikely that
you want to have this policy in production.
- Author:
- Peter Veentjer.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final NoOpBackoffPolicy INSTANCE
NoOpBackoffPolicy
public NoOpBackoffPolicy()
delay
public void delay(Transaction t)
throws java.lang.InterruptedException
- Description copied from interface:
BackoffPolicy
- Executes the delay. This call is interruptible.
- Specified by:
delay in interface BackoffPolicy
- Parameters:
t - the transaction that is going to be restarted. The transaction should never be null, but it
depends on the implementation if this is checked.
- Throws:
java.lang.InterruptedException - if the delay is interrupted.
delayedUninterruptible
public void delayedUninterruptible(Transaction t)
- Description copied from interface:
BackoffPolicy
- Executes the delay without the possibility of being interrupted.
- Specified by:
delayedUninterruptible in interface BackoffPolicy
- Parameters:
t - the transaction that is going to be restarted. The transaction should never be null, but it
depends on the implementation if this is checked.
Copyright © 2008-2010 Multiverse. All Rights Reserved.