orca.shirako.kernel
Class Reservation

java.lang.Object
  extended by orca.shirako.kernel.Reservation
All Implemented Interfaces:
IRecover, IReservation, IReservationStatus, ISerialize
Direct Known Subclasses:
ResourceReservation

public abstract class Reservation
extends java.lang.Object
implements IReservation

Reservation is the base for all reservation objects. It implements a part of the IReservation interface and defines the core functions expected by the kernel from all reservation classes. This is an abstract class and is intended as a building block of higher-level reservation classes.


Nested Class Summary
protected  class Reservation.CountHelper
          Helper class for counting units.
 
Field Summary
protected  IActor actor
          Cached pointer to the actor that operates on this reservation.
protected  int category
          Reservation category.
protected  long closeTime
          The cycle in which the reservation must be closed.
protected  boolean dirty
          Dirty flag.
protected  java.lang.String errMsg
          Error message.
protected  boolean expired
          True if this reservation is expired.
protected  boolean extended
          Has this reservation been extended?
protected  ReservationState from
          State before the last transition.
protected  Guard guard
          Access control monitor
protected  java.util.HashSet<IStateChangeListener> listeners
          A set of registered state listeners for this reservation.
protected  LoggingTool logger
          Informational logger
protected  int pending
          Reservation pending state.
static java.lang.String PropertyCategory
           
static java.lang.String PropertyCloseTime
           
static java.lang.String PropertyExtended
           
static java.lang.String PropertyGuard
           
static java.lang.String PropertyPending
           
static java.lang.String PropertySlice
           
static java.lang.String PropertySliceID
           
static java.lang.String PropertyState
           
protected  ReservationID rid
          The unique reservation identifier.
protected  Slice slice
          Slice this reservation belongs to.
protected  SliceID sliceID
          Cached slice id.
protected  java.lang.String slicename
          Cached slice name.
protected  int state
          Reservation state.
protected  boolean stateTransition
          True if the last state transition is not committed to external storage.
 
Fields inherited from interface orca.shirako.api.IReservation
CategoryAll, CategoryAuthority, CategoryBroker, CategoryClient, PropertyClass, PropertyID
 
Constructor Summary
Reservation()
           
 
Method Summary
 void awaitActive()
          Waits for this reservation to become active.
 void awaitClosed()
          Waits for the reservation to close.
 void awaitTicketed()
          Waits for this reservation to be ticketed.
protected  void claim()
          Claim an exported "will call" reservation.
 void clearDirty()
          Marks that the reservation has no uncommitted updates and state transitions.
protected  void clearNotice()
          Clears all event notices associated with the reservation.
protected  void close()
          Close the reservation No exceptions: catch and log errors.
static ResourceReservation createInstance(java.util.Properties p)
          Creates and initializes a new reservation from a saved properties list.
protected  void error(java.lang.String err)
          Logs an error and throws an exception
protected  void extendLease()
           
protected  void extendTicket(IActor actor)
          Extend ticket
 IActor getActor()
          Returns the actor in control of the reservation.
 int getCategory()
          Returns the reservation category.
static int getCategory(java.util.Properties p)
          Extracts the reservation category embedded in the properties list
 long getCloseTime()
          Returns the time the reservation is scheduled to be closed.
protected  Guard getGuard()
          Returns the guard associated with the reservation.
protected  java.lang.String getNotice()
          Returns a descriptive string if this reservation requires attention, else null.
 int getPendingState()
          Returns the current pending reservation state
 java.lang.String getPendingStateName()
          Returns the name of the current pending reservation state
 ReservationState getPreviousReservationState()
          Returns the previous composite reservation state.
 ReservationID getReservationID()
          Returns the reservation identifier.
static ReservationID getReservationID(java.util.Properties p)
          Extracts the reservation identifier from the properties list.
 ReservationState getReservationState()
          Returns the current composite reservation state.
 Slice getSlice()
          Returns the slice the reservation belongs to.
 SliceID getSliceID()
           
 java.lang.String getSliceName()
          Returns the name of the slice the reservation belongs to.
static java.lang.String getSliceName(java.util.Properties p)
          Extracts the slice name from the properties list.
 int getState()
          Returns the current reservation state.
 java.lang.String getStateName()
          Returns the name of the current reservation state.
protected  void handleDuplicateRequest(int operation)
          Handles a duplicate request.
 boolean hasUncommittedTransition()
          Checks if the reservation has uncommitted state transitions.
protected  void internalError(java.lang.String err)
          Logs the specified error and throws an exceptions.
 boolean isActive()
          Checks if the reservation is active.
 boolean isActiveTicketed()
          Checks if the reservation is activeTicketed.
 boolean isClosed()
          Checks if the reservation is closed.
 boolean isClosing()
          Checks if the reservation is closing.
 boolean isDirty()
          Checks if the reservation has uncommitted updates.
 boolean isExpired()
          Checks if the reservation has expired.
 boolean isExtended()
          Checks if the reservation has extended at least once.
 boolean isExtendingLease()
          Checks if the reservation is extending a lease.
 boolean isExtendingTicket()
          Checks if the reservation is extending a ticket.
 boolean isFailed()
          Checks if the reservation has failed.
 boolean isNascent()
          Checks if the reservation is nascent
 boolean isNoPending()
          Checks if there is no pending operation.
 boolean isPriming()
          Checks if the reservation is priming.
 boolean isRedeeming()
          Checks if the reservation is redeeming.
 boolean isTerminal()
          Checks if the reservation is terminal, e.g., closing, closed, or failed.
 boolean isTicketed()
          Check if the reservation is ticketed.
 boolean isTicketing()
          Checks if the reservation is obtaining a new ticket.
protected  void logError(java.lang.String err)
          Logs an error
protected  void logException(java.lang.String err, java.lang.Exception e)
          Logs an exception related to the reservation.
protected  void logRemoteError(java.lang.String err)
          Logs an error that occurred on a peer
protected  void logTransition()
           
protected  void logWarning(java.lang.String err)
          Logs a warning about the reservation.
protected  void nothingPending()
          Throws an exception iff this reservation has a pending operation.
protected  void notifyListeners()
          Notifies all state change listeners about a transition from the previous to the current state.
protected  void notifyListeners(ReservationState from, ReservationState to)
          Notifies all state change listers about the current transition
protected  void prepareProbe()
          Prepare a reservation probe
protected  void probe()
          Probes a reservation and sync with resource status and client (server only).
protected  void probePending()
          Probe a reservation with a pending request.
protected  void ready()
          An incoming client request named this validated Reservation object for an existing reservation.
 void registerListener(IStateChangeListener l)
          Registers a listener.
protected  void reserve(IPolicy policy)
          Reserve resources: ticket() initiate or request, or redeem() request.
 void reset(java.util.Properties p)
          De-serializes the object from the given properties list.
 void revisit(IActor actor, java.util.Properties p)
          Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to.
 java.util.Properties save()
          Serializes the object into a properties list.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
protected  java.util.Properties saveID()
          Saves enough information to identify the reservation.
protected  void serviceClaim()
           
protected  void serviceClose()
          Unlocked - Close the reservation
protected  void serviceExtendLease()
          Unlocked - Extend lease
protected  void serviceExtendTicket()
          Unlocked - Extend ticket
protected  void serviceProbe()
          Unlocked - Services a probe by completing any complete operations.
protected  void serviceReserve()
          Unlocked - Reserve resources: ticket() initiate or request, or redeem() request (new reservation).
protected  void serviceUpdateLease()
          Unlocked - Update the lease
protected  void serviceUpdateTicket()
          Unlocked - Update the ticket
protected  void setActor(IActor actor)
          Sets the actor in control of the reservation.
 void setCloseTime(long closeTime)
          Returns the time the reservation is scheduled to be closed.
 void setDirty()
          Marks the reservation as containing uncommitted updates.
 void setExpired(boolean value)
          Sets the expiration flag.
protected  void setLogger(LoggingTool logger)
          Attaches the logger to use for the reservation.
 void setSlice(Slice slice)
          Sets the slice the reservation belongs to.
protected  void transition(java.lang.String prefix, int state, int pending)
          Transitions this reservation into a new state.
 void unregisterListener(IStateChangeListener l)
          Unregisters the listener.
protected  void updateLease(ResourceReservation rarg, UpdateData udd)
          Update the lease
protected  void updateTicket(ResourceReservation rarg, UpdateData udd)
          Update the ticket
protected  void validate()
          Validates the reservation.
protected  void validateIncoming()
          Validates a reservation as it arrives to an actor
protected  void validateOutgoing()
          Validates a reservation as it is about to leave an actor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface orca.shirako.api.IReservationStatus
isExpired
 

Field Detail

PropertyCategory

public static final java.lang.String PropertyCategory
See Also:
Constant Field Values

PropertyState

public static final java.lang.String PropertyState
See Also:
Constant Field Values

PropertyPending

public static final java.lang.String PropertyPending
See Also:
Constant Field Values

PropertyGuard

public static final java.lang.String PropertyGuard
See Also:
Constant Field Values

PropertyExtended

public static final java.lang.String PropertyExtended
See Also:
Constant Field Values

PropertySlice

public static final java.lang.String PropertySlice
See Also:
Constant Field Values

PropertySliceID

public static final java.lang.String PropertySliceID
See Also:
Constant Field Values

PropertyCloseTime

public static final java.lang.String PropertyCloseTime
See Also:
Constant Field Values

rid

protected ReservationID rid
The unique reservation identifier.


category

protected int category
Reservation category. Subclasses should supply the correct value.


slice

protected Slice slice
Slice this reservation belongs to.


state

protected int state
Reservation state.


pending

protected int pending
Reservation pending state.


guard

protected Guard guard
Access control monitor


extended

protected boolean extended
Has this reservation been extended?


closeTime

protected long closeTime
The cycle in which the reservation must be closed. This is a helper field to simplify the computation of the close time after we extend a ticket.


slicename

protected java.lang.String slicename
Cached slice name. Necessary so that we can obtain the slice for reservations that have not been fully recovered.


sliceID

protected SliceID sliceID
Cached slice id. Necessary so that we can obtain the slice for reservations that have not been fully recovered.


from

protected ReservationState from
State before the last transition. Do not persist.


logger

protected LoggingTool logger
Informational logger


errMsg

protected java.lang.String errMsg
Error message.


dirty

protected boolean dirty
Dirty flag. Indicates that the state of the reservation object has changed since the last time it was persisted. Currently only transition updates the dirty flag


expired

protected boolean expired
True if this reservation is expired. Used during recovery


actor

protected IActor actor
Cached pointer to the actor that operates on this reservation.


listeners

protected java.util.HashSet<IStateChangeListener> listeners
A set of registered state listeners for this reservation.


stateTransition

protected boolean stateTransition
True if the last state transition is not committed to external storage.

Constructor Detail

Reservation

public Reservation()
Method Detail

save

public java.util.Properties save()
                          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into a properties list.

Specified by:
save in interface ISerialize
Returns:
properties list representing this object
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

saveID

protected java.util.Properties saveID()
                               throws java.lang.Exception
Saves enough information to identify the reservation.

Returns:
properties list with identifying information.
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Description copied from interface: ISerialize
De-serializes the object from the given properties list.

Specified by:
reset in interface ISerialize
Parameters:
p - properties list containing the serialized version of the object
Throws:
java.lang.Exception

revisit

public void revisit(IActor actor,
                    java.util.Properties p)
             throws java.lang.Exception
Description copied from interface: IRecover
Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to. The component can use the actor object to access other objects necessary for its complete recovery.

Specified by:
revisit in interface IRecover
Parameters:
actor - actor object the component belongs to
p - properties list containing configuration data about the component
Throws:
java.lang.Exception

logTransition

protected void logTransition()

transition

protected void transition(java.lang.String prefix,
                          int state,
                          int pending)
Transitions this reservation into a new state.

Parameters:
state - the new state
pending - if reservation is pending

notifyListeners

protected void notifyListeners(ReservationState from,
                               ReservationState to)
Notifies all state change listers about the current transition

Parameters:
from - state transitioned from
to - state transitioned to

notifyListeners

protected void notifyListeners()
Notifies all state change listeners about a transition from the previous to the current state.


reserve

protected void reserve(IPolicy policy)
                throws java.lang.Exception
Reserve resources: ticket() initiate or request, or redeem() request. New reservation.

Parameters:
policy - the mapper for the reservation
Throws:
java.lang.Exception

serviceReserve

protected void serviceReserve()
                       throws java.lang.Exception
Unlocked - Reserve resources: ticket() initiate or request, or redeem() request (new reservation).

Parameters:
mapper - the mapper for the reservation
Throws:
java.lang.Exception

claim

protected void claim()
              throws java.lang.Exception
Claim an exported "will call" reservation.

Throws:
java.lang.Exception

serviceClaim

protected void serviceClaim()
                     throws java.lang.Exception
Throws:
java.lang.Exception

extendTicket

protected void extendTicket(IActor actor)
                     throws java.lang.Exception
Extend ticket

Parameters:
newterm - the new term for the ticket
Throws:
java.lang.Exception

serviceExtendTicket

protected void serviceExtendTicket()
                            throws java.lang.Exception
Unlocked - Extend ticket

Parameters:
newterm - the new term for the ticket
Throws:
java.lang.Exception

extendLease

protected void extendLease()
                    throws java.lang.Exception
Throws:
java.lang.Exception

serviceExtendLease

protected void serviceExtendLease()
                           throws java.lang.Exception
Unlocked - Extend lease

Parameters:
newterm - the new term for the ticket
Throws:
java.lang.Exception

updateTicket

protected void updateTicket(ResourceReservation rarg,
                            UpdateData udd)
                     throws java.lang.Exception
Update the ticket

Parameters:
rarg - the reservation being updated
udd - the new data
Throws:
java.lang.Exception

serviceUpdateTicket

protected void serviceUpdateTicket()
                            throws java.lang.Exception
Unlocked - Update the ticket

Parameters:
rarg - the reservation being updated
udd - the new data
Throws:
java.lang.Exception

updateLease

protected void updateLease(ResourceReservation rarg,
                           UpdateData udd)
                    throws java.lang.Exception
Update the lease

Parameters:
rarg - the reservation being updated
udd - the new data
Throws:
java.lang.Exception

serviceUpdateLease

protected void serviceUpdateLease()
                           throws java.lang.Exception
Unlocked - Update the lease

Parameters:
rarg - the reservation being updated
udd - the new data
Throws:
java.lang.Exception

close

protected void close()
Close the reservation No exceptions: catch and log errors.


serviceClose

protected void serviceClose()
Unlocked - Close the reservation


prepareProbe

protected void prepareProbe()
                     throws java.lang.Exception
Prepare a reservation probe

Throws:
java.lang.Exception

probe

protected void probe()
              throws java.lang.Exception
Probes a reservation and sync with resource status and client (server only). Generates an update to sync with the client.

Throws:
java.lang.Exception

probePending

protected void probePending()
                     throws java.lang.Exception
Probe a reservation with a pending request. On server, if the operation completed, handle it and generate an update. If no pending request completed then do nothing.

Throws:
java.lang.Exception

serviceProbe

protected void serviceProbe()
                     throws java.lang.Exception
Unlocked - Services a probe by completing any complete operations.

Throws:
java.lang.Exception

handleDuplicateRequest

protected void handleDuplicateRequest(int operation)
                               throws java.lang.Exception
Handles a duplicate request.

Parameters:
operation - operation type code
Throws:
java.lang.Exception

ready

protected void ready()
              throws java.lang.Exception
An incoming client request named this validated Reservation object for an existing reservation. Check to be sure that it has not been destroyed in a race since the validate.

Throws:
java.lang.Exception - thrown if the state is closed or failed

nothingPending

protected void nothingPending()
                       throws java.lang.Exception
Throws an exception iff this reservation has a pending operation.

Throws:
java.lang.Exception

validate

protected void validate()
                 throws java.lang.Exception
Validates the reservation. For use by prepare() methods defined by subclasses.

Throws:
java.lang.Exception

validateIncoming

protected void validateIncoming()
                         throws java.lang.Exception
Validates a reservation as it arrives to an actor

Throws:
java.lang.Exception

validateOutgoing

protected void validateOutgoing()
                         throws java.lang.Exception
Validates a reservation as it is about to leave an actor

Throws:
java.lang.Exception

internalError

protected void internalError(java.lang.String err)
                      throws java.lang.Exception
Logs the specified error and throws an exceptions.

Parameters:
err - error message
Throws:
java.lang.Exception

logRemoteError

protected void logRemoteError(java.lang.String err)
Logs an error that occurred on a peer

Parameters:
err - The error message

logError

protected void logError(java.lang.String err)
Logs an error

Parameters:
err - The error message

logWarning

protected void logWarning(java.lang.String err)
Logs a warning about the reservation.

Parameters:
err - The error message

logException

protected void logException(java.lang.String err,
                            java.lang.Exception e)
Logs an exception related to the reservation.

Parameters:
err - error message
e - exception

error

protected void error(java.lang.String err)
              throws java.lang.Exception
Logs an error and throws an exception

Parameters:
err - The error message
Throws:
java.lang.Exception

isPriming

public boolean isPriming()
Description copied from interface: IReservationStatus
Checks if the reservation is priming.

Specified by:
isPriming in interface IReservationStatus
Returns:
true if the reservation is priming

isClosed

public boolean isClosed()
Description copied from interface: IReservationStatus
Checks if the reservation is closed.

Specified by:
isClosed in interface IReservationStatus
Returns:
true if the reservation is closed

isClosing

public boolean isClosing()
Description copied from interface: IReservationStatus
Checks if the reservation is closing.

Specified by:
isClosing in interface IReservationStatus
Returns:
true if the reservation pending is closing

isNascent

public boolean isNascent()
Description copied from interface: IReservationStatus
Checks if the reservation is nascent

Specified by:
isNascent in interface IReservationStatus
Returns:
true if the reservation pending is nascent

isFailed

public boolean isFailed()
Description copied from interface: IReservationStatus
Checks if the reservation has failed.

Specified by:
isFailed in interface IReservationStatus
Returns:
true if the reservation has failed

isActive

public boolean isActive()
Description copied from interface: IReservationStatus
Checks if the reservation is active.

Specified by:
isActive in interface IReservationStatus
Returns:
true if the reservation is active

isActiveTicketed

public boolean isActiveTicketed()
Description copied from interface: IReservationStatus
Checks if the reservation is activeTicketed.

Specified by:
isActiveTicketed in interface IReservationStatus
Returns:
true if the reservation is activeTicketed

isTicketed

public boolean isTicketed()
Description copied from interface: IReservationStatus
Check if the reservation is ticketed.

Specified by:
isTicketed in interface IReservationStatus
Returns:
true iff the reservation is ticketed

isRedeeming

public boolean isRedeeming()
Description copied from interface: IReservationStatus
Checks if the reservation is redeeming.

Specified by:
isRedeeming in interface IReservationStatus
Returns:
true if the reservation is redeeming

isExtendingLease

public boolean isExtendingLease()
Description copied from interface: IReservationStatus
Checks if the reservation is extending a lease.

Specified by:
isExtendingLease in interface IReservationStatus
Returns:
true if the reservation is extending a lease

isExtendingTicket

public boolean isExtendingTicket()
Description copied from interface: IReservationStatus
Checks if the reservation is extending a ticket.

Specified by:
isExtendingTicket in interface IReservationStatus
Returns:
true if the reservation is extending a ticket

isTicketing

public boolean isTicketing()
Description copied from interface: IReservationStatus
Checks if the reservation is obtaining a new ticket.

Specified by:
isTicketing in interface IReservationStatus
Returns:
true if the reservation is obtaining a ticket

isTerminal

public boolean isTerminal()
Description copied from interface: IReservationStatus
Checks if the reservation is terminal, e.g., closing, closed, or failed.

Specified by:
isTerminal in interface IReservationStatus
Returns:
true if the reservation is terminal.

isNoPending

public boolean isNoPending()
Description copied from interface: IReservationStatus
Checks if there is no pending operation.

Specified by:
isNoPending in interface IReservationStatus
Returns:
true if there is no pending operation

awaitActive

public void awaitActive()
                 throws java.lang.InterruptedException
Description copied from interface: IReservation
Waits for this reservation to become active.

Specified by:
awaitActive in interface IReservation
Throws:
java.lang.InterruptedException

awaitClosed

public void awaitClosed()
                 throws java.lang.InterruptedException
Description copied from interface: IReservation
Waits for the reservation to close.

Specified by:
awaitClosed in interface IReservation
Throws:
java.lang.InterruptedException

awaitTicketed

public void awaitTicketed()
                   throws java.lang.InterruptedException
Description copied from interface: IReservation
Waits for this reservation to be ticketed.

Specified by:
awaitTicketed in interface IReservation
Throws:
java.lang.InterruptedException

clearNotice

protected void clearNotice()
Clears all event notices associated with the reservation.


registerListener

public void registerListener(IStateChangeListener l)
Description copied from interface: IReservation
Registers a listener.

Specified by:
registerListener in interface IReservation
Parameters:
l - listener object

unregisterListener

public void unregisterListener(IStateChangeListener l)
Description copied from interface: IReservation
Unregisters the listener.

Specified by:
unregisterListener in interface IReservation
Parameters:
l - listener

getReservationID

public static ReservationID getReservationID(java.util.Properties p)
                                      throws java.lang.Exception
Extracts the reservation identifier from the properties list.

Parameters:
p - properties list
Returns:
reservation identifier
Throws:
java.lang.Exception - if the properties list does not contain a reservation identifier

getSliceName

public static java.lang.String getSliceName(java.util.Properties p)
                                     throws java.lang.Exception
Extracts the slice name from the properties list.

Parameters:
p - properties list
Returns:
slice name
Throws:
java.lang.Exception - if the properties list does not contain a slice name

createInstance

public static ResourceReservation createInstance(java.util.Properties p)
                                          throws java.lang.Exception
Creates and initializes a new reservation from a saved properties list.

Parameters:
p - properties list
Returns:
reservation instance
Throws:
java.lang.Exception

getCategory

public static int getCategory(java.util.Properties p)
Extracts the reservation category embedded in the properties list

Parameters:
p - properties list
Returns:
reservation category or -1 if an error occurs

getActor

public IActor getActor()
Description copied from interface: IReservation
Returns the actor in control of the reservation.

Specified by:
getActor in interface IReservation
Returns:
the actor in control of the reservation

setActor

protected void setActor(IActor actor)
Sets the actor in control of the reservation.

Parameters:
the - actor in control of the reservation

getSlice

public Slice getSlice()
Description copied from interface: IReservation
Returns the slice the reservation belongs to.

Specified by:
getSlice in interface IReservation
Returns:
slice the reservation belongs to

getSliceName

public java.lang.String getSliceName()
Returns the name of the slice the reservation belongs to.

Returns:
slice name

getSliceID

public SliceID getSliceID()

getGuard

protected Guard getGuard()
Returns the guard associated with the reservation.

Returns:

setSlice

public void setSlice(Slice slice)
Description copied from interface: IReservation
Sets the slice the reservation belongs to.

Specified by:
setSlice in interface IReservation
Parameters:
slice - slice the reservation belongs to

getCategory

public int getCategory()
Description copied from interface: IReservation
Returns the reservation category.

Specified by:
getCategory in interface IReservation
Returns:
reservation category

getReservationID

public ReservationID getReservationID()
Description copied from interface: IReservation
Returns the reservation identifier.

Specified by:
getReservationID in interface IReservation
Returns:
reservation identifier

isExtended

public boolean isExtended()
Description copied from interface: IReservationStatus
Checks if the reservation has extended at least once.

Specified by:
isExtended in interface IReservationStatus
Returns:
true if the reservation has extended at least once

getState

public int getState()
Description copied from interface: IReservation
Returns the current reservation state.

Specified by:
getState in interface IReservation
Returns:
current reservation state

getStateName

public java.lang.String getStateName()
Description copied from interface: IReservation
Returns the name of the current reservation state.

Specified by:
getStateName in interface IReservation
Returns:
name of current reservation state

getPendingState

public int getPendingState()
Description copied from interface: IReservation
Returns the current pending reservation state

Specified by:
getPendingState in interface IReservation
Returns:
current pending reservation state

getPendingStateName

public java.lang.String getPendingStateName()
Description copied from interface: IReservation
Returns the name of the current pending reservation state

Specified by:
getPendingStateName in interface IReservation
Returns:
name of current pending reservation state

getReservationState

public ReservationState getReservationState()
Description copied from interface: IReservation
Returns the current composite reservation state.

Specified by:
getReservationState in interface IReservation
Returns:
composite reservation state

getPreviousReservationState

public ReservationState getPreviousReservationState()
Description copied from interface: IReservation
Returns the previous composite reservation state.

Specified by:
getPreviousReservationState in interface IReservation
Returns:
previous composite reservation state

isDirty

public boolean isDirty()
Description copied from interface: IReservation
Checks if the reservation has uncommitted updates.

Specified by:
isDirty in interface IReservation
Returns:
true if the reservation has uncommitted updates

hasUncommittedTransition

public boolean hasUncommittedTransition()
Description copied from interface: IReservation
Checks if the reservation has uncommitted state transitions.

Specified by:
hasUncommittedTransition in interface IReservation
Returns:
true if the reservation has an uncommitted transition

clearDirty

public void clearDirty()
Description copied from interface: IReservation
Marks that the reservation has no uncommitted updates and state transitions.

Specified by:
clearDirty in interface IReservation

setDirty

public void setDirty()
Description copied from interface: IReservation
Marks the reservation as containing uncommitted updates.

Specified by:
setDirty in interface IReservation

setLogger

protected void setLogger(LoggingTool logger)
Attaches the logger to use for the reservation.

Parameters:
logger - logger object

setExpired

public void setExpired(boolean value)
Description copied from interface: IReservationStatus
Sets the expiration flag.

Specified by:
setExpired in interface IReservationStatus
Parameters:
value - true if the reservation is expired

isExpired

public boolean isExpired()
Description copied from interface: IReservationStatus
Checks if the reservation has expired.

Specified by:
isExpired in interface IReservationStatus
Returns:
true if the reservation has expired

getNotice

protected java.lang.String getNotice()
Returns a descriptive string if this reservation requires attention, else null.

Returns:

getCloseTime

public long getCloseTime()
Description copied from interface: IReservation
Returns the time the reservation is scheduled to be closed.

Specified by:
getCloseTime in interface IReservation
Returns:
the time the reservation is scheduled to be closed

setCloseTime

public void setCloseTime(long closeTime)
Description copied from interface: IReservation
Returns the time the reservation is scheduled to be closed.

Specified by:
setCloseTime in interface IReservation


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.