public class BugOperator extends Object
Of course : use with care. It is useful for chaos monkey testing.
Constructor and Description |
---|
BugOperator()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
BugOperator |
busy()
Go for a busy loop, forever
|
BugOperator |
busy(long milli)
Go busy for a while
|
boolean |
fire()
fire the operator
|
BugOperator |
halt()
Halt your jvm
|
BugOperator |
heisenberg()
Introduce a random bug once every 10000 * 360 message.
|
BugOperator |
memory()
cause a memory exception
|
BugOperator |
memory(long numK)
Fill memory with as many K bytes
|
BugOperator |
onceEvery(int v)
Make the bug operator act once in a while
|
void |
privateBusy(long milli)
Busy wait callable from within an punchplatform program.
|
static void |
privateFill(long numKo) |
void |
privateSleep(long milli) |
BugOperator |
raise()
Raise a runtime exception exception
|
BugOperator |
raise(RuntimeException e)
Raise a provided runtime exception
|
BugOperator |
sleep()
Sleep forever
|
BugOperator |
sleep(long milli)
sleep for a while
|
public BugOperator onceEvery(int v)
v
- if 10, it will fire one every 10 callpublic BugOperator raise()
public BugOperator raise(RuntimeException e)
e
- a runtime exceptionpublic BugOperator sleep()
public BugOperator sleep(long milli)
milli
- the sleep delay in millisecondspublic BugOperator busy()
public BugOperator busy(long milli)
milli
- the busy delay in millisecondspublic BugOperator memory()
public BugOperator memory(long numK)
numK
- the amount of memory to fillpublic BugOperator halt()
public BugOperator heisenberg()
public boolean fire()
public void privateBusy(long milli)
milli
- the busy delay in millisecondspublic void privateSleep(long milli)
public static void privateFill(long numKo)
Copyright © 2022. All rights reserved.