public class ControllerBB extends Blackboard
| Modifier and Type | Field and Description |
|---|---|
static ControllerBB |
bbInstance |
static String |
EnableDeadKey |
static String |
EnableSickKey |
static String |
EnableSlowListenerKey |
static String |
ErrorKey |
static int |
ExceptionCounter |
static String |
InitIsCompleteKey |
static String |
IsDeadKey |
static String |
IsSickKey |
static String |
MembershipFailureBegunKey |
static String |
MembershipFailureCompleteKey |
static int |
metCounter |
static String |
NumForcedDiscEventsKey |
static String |
ReadyForInitKey |
static String |
SevereAlertKey |
static String |
VmRestarted |
counterNames, GemFire, RMI| Constructor and Description |
|---|
ControllerBB() |
ControllerBB(String name,
String type)
Creates a sample blackboard using the specified name and transport type.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkEventCounters(String baseKey,
List vmList,
int expectedCount)
Check event counters in the ControllerBB shared map.
|
static void |
checkForError()
Check if an error has been recorded in the blackboard.
|
static void |
enablePlayDead()
Enable becoming dead for the current vm
|
static void |
enablePlayDead(int vmID)
Enable becoming dead for the given vmid
|
static void |
enableSickness()
Enable sickness for the current vm
|
static void |
enableSickness(int vmID)
Enable sickness for the given vmid
|
static void |
enableSlowListener()
Enable slow listeners for the current vm
|
static void |
enableSlowListener(int vmID)
Enable slow listeners for the given vmid
|
static ControllerBB |
getBB()
Get the Blackboard
|
static int |
getMapCounter(String keyBase)
Get the value of the shared map counter for this vm.
|
static long |
getMembershipFailureCompletionTime()
Return the currentTimeMillis value of when membership failure completed
|
static long |
getMembershipFailureStartTime()
Return the currentTimeMillis value of when membership failure started
|
static int |
getVmIdForPid(int pid)
Return the vmid for the given pid, assuming this was recorded in the bb
during init tasks.
|
static void |
incMapCounter(String keyBase)
Atomically increment a counter in the ControllerBB sharedMap.
|
static boolean |
isAlertEnabled(int vmID)
Alerts are enable if enabled for sick or slow, but if dead
is also enabled, we expect a forced disconnect, not an alert.
|
static boolean |
isMembershipFailureComplete()
Return whether membership failure is complete for this vm.
|
static boolean |
isPlayDeadEnabled()
Return whether the current vm is enabled for being dead.
|
static boolean |
isPlayDeadEnabled(int vmID)
Return whether the given vm is enabled for being dead.
|
static boolean |
isReadyForInit()
Return whether this vm is ready for initialization.
|
static boolean |
isReadyForInit(int vmID)
Return whether this vm is ready for initialization (typically
after disconnecting).
|
static boolean |
isSicknessEnabled()
Return whether sickness is enabled for the current vm.
|
static boolean |
isSicknessEnabled(int vmID)
Return whether sickness is enabled for the given vm.
|
static boolean |
isSlowListenerEnabled()
Return whether slow listeners are enabled for the current vm.
|
static boolean |
isSlowListenerEnabled(int vmID)
Return whether slow listeners are enabled for the given vm.
|
static boolean |
receivedSevereAlert()
Return whether the current vm has received a severe alert.
|
static boolean |
receivedSevereAlert(int vmID)
Return whether the given vm has received a severe alert.
|
static void |
reset(int vmID)
Clear all blackboard signals.
|
static void |
signalInitIsComplete()
Signal that initialization for this VM is complete.
|
static void |
signalInitIsComplete(int vmID)
Signal that initialization for the given VM is complete.
|
static void |
signalIsDead()
Signal that the current vm is dead.
|
static void |
signalIsDead(int vmID)
Signal that the given vm is dead.
|
static void |
signalIsSick()
Signal that the current vm is sick.
|
static void |
signalIsSick(int vmID)
Signal that the given vm is sick.
|
static void |
signalMembershipFailureBegun()
Signal that the membershipFailure has begun.
|
static void |
signalMembershipFailureComplete()
Signal that the membershipFailure is complete.
|
static void |
signalReadyForInit()
Signal that this vm is ready for intialization.
|
static void |
signalReadyForInit(int vmID)
Signal that the given vm is ready for intialization.
|
static void |
signalSevereAlert()
Signal that a severe alert occurred in the current vm.
|
static void |
signalSevereAlert(int vmID)
Signal that a severe alert occurred for the given vm.
|
static void |
signalVmRestarted(int vmID)
Signal that the given vm has restarted.
|
static void |
waitForInitialization()
Wait for the current vm to complete initialization
|
static void |
waitForInitialization(int vmID)
Wait for the given vm to complete initialization
|
static void |
waitForIsDead()
Wait for the current vm to become dead.
|
static void |
waitForIsDead(int vmID)
Wait for the given vmid to become dead.
|
static void |
waitForIsSick()
Wait for the current vm to become sick.
|
static void |
waitForIsSick(int vmID)
Wait for the given vmid to become sick.
|
static void |
waitForRestartedVm(int vmID)
Wait for the given vm to restart.
|
static void |
waitForSevereAlert()
Wait for the current vm to recognize a severe alert.
|
static void |
waitForSevereAlert(int vmID)
Wait for the given vmid to recognize a severe alert.
|
static void |
waitMembershipFailureComplete()
Wait for membership failure to complete.
|
static void |
waitMembershipFailureComplete(int vmID)
Wait for membership failure to complete.
|
createSharedCounters, createSharedLock, createSharedMap, getCounterNames, getSharedCounter, getSharedCounters, getSharedLock, getSharedMap, print, printSharedCounters, printSharedMappublic static ControllerBB bbInstance
public static int ExceptionCounter
public static int metCounter
public static final String ErrorKey
public static final String EnableSlowListenerKey
public static final String EnableSickKey
public static final String EnableDeadKey
public static final String ReadyForInitKey
public static final String InitIsCompleteKey
public static final String MembershipFailureBegunKey
public static final String MembershipFailureCompleteKey
public static final String SevereAlertKey
public static final String IsSickKey
public static final String IsDeadKey
public static final String NumForcedDiscEventsKey
public static final String VmRestarted
public static ControllerBB getBB()
public static boolean isAlertEnabled(int vmID)
public static void enableSlowListener()
public static void enableSlowListener(int vmID)
public static boolean isSlowListenerEnabled()
public static boolean isSlowListenerEnabled(int vmID)
public static void signalReadyForInit()
public static void signalReadyForInit(int vmID)
public static boolean isReadyForInit()
public static boolean isReadyForInit(int vmID)
public static void signalInitIsComplete()
public static void signalInitIsComplete(int vmID)
public static void waitForInitialization()
public static void waitForInitialization(int vmID)
public static void signalVmRestarted(int vmID)
public static void waitForRestartedVm(int vmID)
public static void signalMembershipFailureBegun()
public static void signalMembershipFailureComplete()
public static long getMembershipFailureStartTime()
public static long getMembershipFailureCompletionTime()
public static boolean isMembershipFailureComplete()
public static void waitMembershipFailureComplete()
public static void waitMembershipFailureComplete(int vmID)
public static void enableSickness()
public static void enableSickness(int vmID)
public static boolean isSicknessEnabled()
public static boolean isSicknessEnabled(int vmID)
public static void signalIsSick()
public static void signalIsSick(int vmID)
public static void waitForIsSick()
public static void waitForIsSick(int vmID)
public static void enablePlayDead()
public static void enablePlayDead(int vmID)
public static boolean isPlayDeadEnabled()
public static boolean isPlayDeadEnabled(int vmID)
public static void signalIsDead()
public static void signalIsDead(int vmID)
public static void waitForIsDead()
public static void waitForIsDead(int vmID)
public static void signalSevereAlert()
public static void signalSevereAlert(int vmID)
public static boolean receivedSevereAlert()
public static boolean receivedSevereAlert(int vmID)
public static void waitForSevereAlert()
public static void waitForSevereAlert(int vmID)
public static int getMapCounter(String keyBase)
public static void incMapCounter(String keyBase)
keyBase - A string from ControllerBB that prefixes a vm id
to use as a key in the ControllerBB shared map.
The VM id used is the current vm's id.public static void checkForError()
public static int getVmIdForPid(int pid)
public static void reset(int vmID)
public static void checkEventCounters(String baseKey, List vmList, int expectedCount)
baseKey - The base string of the key to check (the prefix to the vm id)vmList - The vms (ClientVmInfo) for the baseKey should have a value of expectedCount.expectedCount - The expected value of any baseKeys that refer to the
given vmIds, otherwise the expectedCount is 0.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.