|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjbora.WhiteBoard
A table of integers with one element corresponding to each
group member. Consists of pairs (ProcessID, int).
Each whiteboard instance is a table of integers, with one element
corresponding to each member.
The call JBora.whiteBoardUpdate(value)
sets the element of the table corresponding to the invoking member to val.
The call JBora.whiteBoardRead(proc)
returns the value of the table element associated with group member p
(p must be in the same view as the invoking process).
Updates to the whiteboard need not trigger additional multicasts.
The current whiteboard value is automatically piggybacked into messages
that the GC-layer has to exchange anyway. If no messages are exchanged
by the GC-layer, whiteboard information is multicast at the predefined
intervals. (See JBora constructor.)
Whiteboard mechanism was designed as an aid in implementing load-balancing policies since it allows the quick and efficient propagation of load indexes among servers.
| Constructor Summary | |
WhiteBoard()
Creates a new whiteboard object. |
|
| Method Summary | |
Integer |
getValue(ProcessID proc)
Gets the value associated with a ProcessID. |
void |
putValue(ProcessID proc,
int value)
Inserts a value (if the value is negative, then it inserts 0). |
int |
size()
Returns the number of elements in the whiteboard. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WhiteBoard()
| Method Detail |
public Integer getValue(ProcessID proc)
throws JBoraException
proc -
WhiteboardException - proc is null or proc is not in the whiteboard
JBoraException
public void putValue(ProcessID proc,
int value)
throws JBoraException
proc - Keyvalue - Value
WhiteboardException - proc is null or proc is not in the whiteboard
JBoraExceptionpublic int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||