|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.time.calendar.BaseCalendar
orca.shirako.time.calendar.AuthorityCalendar
public class AuthorityCalendar
An AuthorityCalendar is used to organized reservation
information for an authority. It extends the functionality of
BaseCalendar with a number of collections:
| Field Summary | |
|---|---|
protected ReservationList |
closing
List of reservations to be closed grouped by cycle |
protected ReservationHoldings |
outlays
All currently active reservations |
protected ReservationList |
requests
List of incoming requests grouped by start cycle |
| Fields inherited from class orca.shirako.time.calendar.BaseCalendar |
|---|
clock |
| Constructor Summary | |
|---|---|
AuthorityCalendar(ActorClock clock)
|
|
| Method Summary | |
|---|---|
void |
addClosing(ResourceReservation reservation,
long cycle)
Add a reservation to be closed on the given cycle |
void |
addOutlay(ResourceReservation reservation,
long start,
long end)
Add the serviced client reservation |
void |
addRequest(ResourceReservation reservation,
long cycle)
Add a client request |
ReservationSet |
getClosing(long cycle)
Return the set of reservation marked closed for a particular cycle |
ReservationSet |
getOutlays()
Return the active client reservations |
ReservationSet |
getOutlays(long cycle)
Return the active client reservations at the given time instance |
ReservationSet |
getRequests(long cycle)
Obtain all client requests for the given cycle |
void |
remove(ResourceReservation reservation)
|
void |
removeClosing(ResourceReservation reservation)
Remove the given reservation from the list of closing reservations. |
void |
removeClosing(ResourceReservation reservation,
long cycle)
Remove the given reservation from the list of closing reservations on the given cycle. |
void |
removeOutlay(AuthorityReservation reservation)
|
void |
removeRequest(ReservationServer reservation)
|
void |
removeScheduledOrInProgress(ResourceReservation reservation)
|
void |
tick(long cycle)
Perform calendar cleanup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ReservationList requests
protected ReservationList closing
protected ReservationHoldings outlays
| Constructor Detail |
|---|
public AuthorityCalendar(ActorClock clock)
| Method Detail |
|---|
public void remove(ResourceReservation reservation)
public void removeScheduledOrInProgress(ResourceReservation reservation)
public void removeClosing(ResourceReservation reservation)
reservation - The reservationpublic ReservationSet getRequests(long cycle)
cycle -
public void addRequest(ResourceReservation reservation,
long cycle)
reservation - cycle - public void removeRequest(ReservationServer reservation)
public ReservationSet getClosing(long cycle)
cycle -
java.lang.Exception
public void addClosing(ResourceReservation reservation,
long cycle)
reservation - The reservationcycle - The cycle
public void removeClosing(ResourceReservation reservation,
long cycle)
reservation - The reservationcycle - The cycle
public void addOutlay(ResourceReservation reservation,
long start,
long end)
reservation - The client reservationterm - The term of the client reservationpublic void removeOutlay(AuthorityReservation reservation)
public ReservationSet getOutlays()
public ReservationSet getOutlays(long cycle)
cycle -
public void tick(long cycle)
BaseCalendar
tick in class BaseCalendar
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||