class AltingBarrierBase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
countdown
The number of processes not yet offered to sync on this barrier.
|
private int |
enrolled
The number of processes enrolled.
|
private AltingBarrier |
frontEnds
All front-ends are chained off here.
|
Constructor and Description |
---|
AltingBarrierBase() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
contract(AltingBarrier ab)
This removes the given front-end chained to this alting barrier.
|
(package private) void |
contract(AltingBarrier[] ab)
This removes the given front-ends chained to this alting barrier.
|
(package private) boolean |
disable()
Withdraw the offer to synchronise.
|
(package private) boolean |
enable()
Record the offer to synchronise.
|
(package private) void |
enroll()
Record re-enrollment.
|
(package private) AltingBarrier |
expand() |
(package private) AltingBarrier[] |
expand(int n) |
(package private) void |
resign()
Record resignation.
|
private AltingBarrier frontEnds
private int enrolled
private int countdown
AltingBarrier[] expand(int n)
AltingBarrier expand()
void contract(AltingBarrier[] ab)
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.
ab
- the front-ends being discarded from this barrier.
This array must be unaltered from one previously delivered by
an expand
.void contract(AltingBarrier ab)
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.
ab
- the front-end being discarded from this barrier.
This array must be unaltered from one previously delivered by
an expand
.boolean enable()
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.
boolean disable()
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.
void resign()
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.
void enroll()
Note: this method should only be called by an AltingBarrier synchronised on this AltingBarrierBase.