public class RBQBlackboard extends Blackboard
Blackboard that maintains statistics about a
RemoteBlockingQueue. The blackboard's shared counters are
used to store the maximum and minimum duration of certain queue
operations. The blackboard's shared map stores the capacity of the
queue and how many poll operations were performed by
each client thread (this gives us an idea of the "fairness" of the
poll operation among multiple threads).| Modifier and Type | Field and Description |
|---|---|
static RBQBlackboard |
bbInstance
The singleton RBQBlackboard
|
static int |
MaxOfferTime
Maximum duration (in nanoseconds) of an offer operation
|
static int |
MaxPollTime
Maximum duration (in nanoseconds) of a poll operation
|
static int |
MinOfferTime
Minimum duration (in nanoseconds) of an offer operation
|
static int |
MinPollTime
Minimum duration (in nanoseconds) of a poll operation
|
static int |
MyCounter
An example counter that shows how a counter can be given an
inital value here; this counter is not used in the example, but
is printed out in the start task to show its initial value
|
static int |
NumOffers
Total number of offer operations performed
|
static int |
NumPolls
Total number of poll operations performed
|
counterNames, GemFire, RMI| Constructor and Description |
|---|
RBQBlackboard()
Required zero-arg constructor for remote method invocations.
|
| Modifier and Type | Method and Description |
|---|---|
static RBQBlackboard |
getBB()
Convenience method to get an instance of RBQBlackboard (for
efficiency reasons).
|
long |
getMaxOfferTime()
Returns the maximum duration (in nanoseconds) of an offer
operation.
|
long |
getMaxPollTime()
Returns the maximum duration (in nanoseconds) of an poll
operation.
|
long |
getMinOfferTime()
Returns the minimum duration (in nanoseconds) of an offer
operation.
|
long |
getMinPollTime()
Returns the minimum duration (in nanoseconds) of an poll
operation.
|
long |
getMyCounter()
Returns the value of the "MyCounter" shared counter
|
long |
getNumOffers()
Returns the total number of offer operations performed.
|
long |
getNumPolls()
Returns the total number of poll operations performed.
|
int |
getQueueCapacity()
Returns the capacity of the queue as store in the blackboard.
|
createSharedCounters, createSharedLock, createSharedMap, getCounterNames, getSharedCounter, getSharedCounters, getSharedLock, getSharedMap, print, printSharedCounters, printSharedMappublic static int MinOfferTime
public static int MaxOfferTime
public static int MinPollTime
public static int MaxPollTime
public static int NumOffers
public static int NumPolls
public static int MyCounter
public static RBQBlackboard bbInstance
public RBQBlackboard()
public static RBQBlackboard getBB()
public int getQueueCapacity()
public long getMinOfferTime()
public long getMaxOfferTime()
public long getNumOffers()
public long getMinPollTime()
public long getMaxPollTime()
public long getNumPolls()
public long getMyCounter()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.