|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IResourceReservation
IResourceReservation extends IReservation with
the notions of resource and term.
| Field Summary |
|---|
| Fields inherited from interface orca.shirako.api.IReservation |
|---|
CategoryAll, CategoryAuthority, CategoryBroker, CategoryClient, PropertyClass, PropertyID |
| Method Summary | |
|---|---|
void |
count(ResourceCount rc,
java.util.Date when)
Tallies up resources in the reservation. |
void |
fail(java.lang.String message)
Marks an operation failure. |
void |
fail(java.lang.String message,
java.lang.Exception e)
Marks an operation failure. |
void |
failWarn(java.lang.String message)
Marks an operation failure. |
int |
forecastUnits(java.util.Date when)
Estimates the resource units controlled by the reservation at some time which may be in the future. |
ResourceSet |
getApprovedResources()
Returns the resources approved for this reservation by the last policy decision. |
Term |
getApprovedTerm()
Returns the term approved for the reservation by the last policy decision. |
ResourceType |
getApprovedType()
Returns the resource type approved for this reservation by the last policy decision. |
int |
getApprovedUnits()
Returns the number of units approved by the last policy decision. |
int |
getLeasedAbstractUnits()
Returns the number of abstract units leased by the reservation. |
int |
getLeasedUnits()
Returns the number of concrete units leased by the reservation. |
ResourceSet |
getPreviousResources()
Returns the resources represented by/allocated to the reservation at the time before the last update. |
Term |
getPreviousTerm()
Returns the previously allocated term for the reservation. |
ResourceSet |
getRequestedResources()
Returns the resources requested for the reservation. |
Term |
getRequestedTerm()
Returns the last requested term. |
ResourceType |
getRequestedType()
Returns the requested resource type. |
int |
getRequestedUnits()
Returns the number of requested units. |
ResourceSet |
getResources()
Returns the resources represented by/allocated to the reservation. |
Term |
getTerm()
Returns the currently allocated term for the reservation. |
ResourceType |
getType()
Returns the resource type allocated to the reservation. |
int |
getUnits()
Returns the currently assigned resource units. |
long |
holding(java.util.Date when)
Returns the resource units known committed to the reservation at some time which may be in the future. |
boolean |
isApproved()
Checks if the policy has made a decision for the reservation. |
boolean |
isBidPending()
Returns marker value set by setBidPending. |
boolean |
isRenewable()
Checks if the reservation is renewable. |
void |
setApproved()
Indicates that the policy has made a decision for the reservation. |
void |
setApproved(Term approvedTerm,
ResourceSet approvedResources)
Sets the term and resources approved by the policy. |
void |
setApprovedResources(ResourceSet approvedResources)
Sets the resources approved for this reservation by the policy. |
void |
setApprovedTerm(Term term)
Sets the term approved for the |
void |
setBidPending(boolean inbid)
Sets marker for whether this reservation is awaiting some external action such as an auction before it can complete a request. |
| Methods inherited from interface orca.shirako.api.IReservation |
|---|
awaitActive, awaitClosed, awaitTicketed, clearDirty, getActor, getCategory, getCloseTime, getPendingState, getPendingStateName, getPreviousReservationState, getReservationID, getReservationState, getSlice, getState, getStateName, hasUncommittedTransition, isDirty, registerListener, setCloseTime, setDirty, setSlice, unregisterListener |
| Methods inherited from interface orca.shirako.api.ISerialize |
|---|
reset, save, save |
| Methods inherited from interface orca.shirako.api.IRecover |
|---|
revisit |
| Methods inherited from interface orca.shirako.api.IReservationStatus |
|---|
isActive, isActiveTicketed, isClosed, isClosing, isExpired, isExpired, isExtended, isExtendingLease, isExtendingTicket, isFailed, isNascent, isNoPending, isPriming, isRedeeming, isTerminal, isTicketed, isTicketing, setExpired |
| Method Detail |
|---|
void count(ResourceCount rc,
java.util.Date when)
Note: "just a hint" unless the kernel lock is held. An exception to our rule of not touching ResourceSet fields. Determines count based on time.
ResourceCount - holder for countsint forecastUnits(java.util.Date when)
when - the date to forecast
long holding(java.util.Date when)
then - the date to forecast
void fail(java.lang.String message)
message - the error message
void fail(java.lang.String message,
java.lang.Exception e)
message - the error messagee - The exceptionvoid failWarn(java.lang.String message)
message - the error messageResourceSet getPreviousResources()
ResourceSet getResources()
ResourceSet getRequestedResources()
ResourceSet getApprovedResources()
void setApprovedResources(ResourceSet approvedResources)
approvedResources - resources the policy approvedTerm getTerm()
Term getPreviousTerm()
Term getRequestedTerm()
Term getApprovedTerm()
void setApprovedTerm(Term term)
term - ResourceType getType()
ResourceType getRequestedType()
ResourceType getApprovedType()
int getUnits()
int getRequestedUnits()
int getApprovedUnits()
int getLeasedUnits()
Note: This call will always return 0 for reservations that have not recreated their concrete sets, e.g., reservations fetched from the database as a result of a query. For such reservations use #getLeasedAbstractUnits() or obtain the actual reservation object.
int getLeasedAbstractUnits()
void setApproved(Term approvedTerm,
ResourceSet approvedResources)
approvedTerm - term the policy approvedapprovedResources - resources the policy approvedvoid setApproved()
boolean isApproved()
void setBidPending(boolean inbid)
inbid - true if waiting, false otherwiseboolean isBidPending()
boolean isRenewable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||