public abstract class CacheSerializableRunnable
extends org.apache.geode.test.dunit.SerializableRunnable
implements org.apache.geode.test.dunit.RepeatableRunnable
SerializableRunnable class, but uses a run2()
method instead that throws CacheException. This way, we don't need to have a lot of
try/catch code in the tests.| Modifier and Type | Class and Description |
|---|---|
static class |
CacheSerializableRunnable.CacheSerializableRunnableException
An exception that wraps a
CacheException |
| Constructor and Description |
|---|
CacheSerializableRunnable(java.lang.String name)
Creates a new
CacheSerializableRunnable with the given name |
CacheSerializableRunnable(java.lang.String name,
java.lang.Object[] args)
Creates a new
CacheSerializableRunnable with the given name |
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Invokes the
run2() method and will wrap any CacheException thrown by
run2 in a CacheSerializableRunnable.CacheSerializableRunnableException. |
abstract void |
run2()
A
run method that may throw a CacheException. |
void |
run3() |
void |
runRepeatingIfNecessary(long repeatTimeoutMs)
Invokes the
run() method. |
public CacheSerializableRunnable(java.lang.String name)
CacheSerializableRunnable with the given namepublic CacheSerializableRunnable(java.lang.String name,
java.lang.Object[] args)
CacheSerializableRunnable with the given namepublic void run()
run2() method and will wrap any CacheException thrown by
run2 in a CacheSerializableRunnable.CacheSerializableRunnableException.run in interface org.apache.geode.test.dunit.SerializableRunnableIFpublic void runRepeatingIfNecessary(long repeatTimeoutMs)
run() method. If AssertionError is thrown, and repeatTimeoutMs is >0, then
repeat the run() method until it either succeeds or repeatTimeoutMs milliseconds have
passed. The AssertionError is only thrown to the caller if the last run still throws it.runRepeatingIfNecessary in interface org.apache.geode.test.dunit.RepeatableRunnablepublic abstract void run2()
throws CacheException
run method that may throw a CacheException.CacheExceptionpublic void run3()
throws CacheException
CacheException