orca.shirako.api
Interface IKernelWrapper

All Known Implementing Classes:
KernelWrapper

public interface IKernelWrapper

IKernelWrapper defines the public kernel operations accessible to actors that must take place through the kernel wrapper. The kernel wrapper is responsible for validating the arguments to internal kernel methods before invoking these calls. The internal kernel methods can only be invoked through an instance of the kernel wrapper.


Method Summary
 void claimRequest(BrokerReservation reservation, AuthToken caller, IClientCallbackProxy callback)
          Processes a request to claim a pre-reserved "will call" ticket.
 void close(ReservationID rid)
          Closes the reservation, potentially initiating a close request to another actor.
 void closeRequest(ResourceReservation reservation, AuthToken caller, boolean compareSequenceNumbers)
          Processes an incoming request to close a reservation.
 void export(BrokerReservation reservation, AuthToken client)
          Initiates a ticket export.
 void extendLease(ReservationClient reservation)
          Initiates a request to extend a lease.
 void extendLeaseRequest(AuthorityReservation reservation, AuthToken caller, boolean compareSequenceNumbers)
          Processes an incoming request for a lease extension.
 int extendReservation(ReservationID rid, ResourceSet resources, Term term)
          Extends the reservation with the given resources and term.
 void extendTicket(ReservationClient reservation)
          Initiates a request to extend a ticket.
 void extendTicketRequest(BrokerReservation reservation, AuthToken caller, boolean compareSequenceNumbers)
          Processes an incoming request for a ticket extension.
 void redeem(ReservationClient reservation)
          Initiates a request to redeem a ticketed reservation.
 void redeemRequest(AuthorityReservation reservation, AuthToken caller, IServiceManagerCallbackProxy callback, boolean compareSequenceNumbers)
          Processes an incoming request for a new lease.
 void removeReservation(ReservationID rid)
          Removes the specified reservation from the kernel data structures.
 void ticket(ReservationClient reservation, IActorIdentity destination)
          Initiates a ticket request.
 void ticketRequest(BrokerReservation reservation, AuthToken caller, IClientCallbackProxy callback, boolean compareSequenceNumbers)
          Processes an incoming request for a new ticket.
 void updateLease(ReservationClient reservation, UpdateData udd, AuthToken caller)
          Handles a lease update from an authority.
 void updateTicket(ReservationClient reservation, UpdateData udd, AuthToken caller)
          Handles a ticket update from upstream broker.
 

Method Detail

removeReservation

void removeReservation(ReservationID rid)
                       throws java.lang.Exception
Removes the specified reservation from the kernel data structures.

Parameters:
rid - identifier of reservation to remove
Throws:
java.lang.Exception

extendReservation

int extendReservation(ReservationID rid,
                      ResourceSet resources,
                      Term term)
                      throws java.lang.Exception
Extends the reservation with the given resources and term.

Parameters:
rid - identifier of reservation to extend
resources - resources for extension
term - term for extension
Returns:
0 on success, a negative exit code on error
Throws:
java.lang.Exception

close

void close(ReservationID rid)
           throws java.lang.Exception
Closes the reservation, potentially initiating a close request to another actor. If the reservation has concrete resources bound to it, this method may return before all close operations have completed. Check the reservation state to determine when close completes.

Parameters:
rid - identifier of reservation to close
Throws:
java.lang.Exception

ticket

void ticket(ReservationClient reservation,
            IActorIdentity destination)
            throws java.lang.Exception
Initiates a ticket request. If the exported flag is set, this is a claim on a pre-reserved "will call" ticket.

Role: Broker or Service Manager.

Parameters:
reservation - reservation parameters for ticket request
destination - identity of the actor the request must be sent to
Throws:
java.lang.Exception

redeem

void redeem(ReservationClient reservation)
            throws java.lang.Exception
Initiates a request to redeem a ticketed reservation.

Role: Service Manager.

Parameters:
reservation - the reservation being redeemed
Throws:
java.lang.Exception

extendTicket

void extendTicket(ReservationClient reservation)
                  throws java.lang.Exception
Initiates a request to extend a ticket.

Role: Broker or Service Manager

Parameters:
reservation - reservation describing the ticket extension request
Throws:
java.lang.Exception

extendLease

void extendLease(ReservationClient reservation)
                 throws java.lang.Exception
Initiates a request to extend a lease.

Role: Service Manager

Parameters:
reservation - reservation describing the extend request
Throws:
java.lang.Exception

updateTicket

void updateTicket(ReservationClient reservation,
                  UpdateData udd,
                  AuthToken caller)
                  throws java.lang.Exception
Handles a ticket update from upstream broker.

Role: Agent or Service Manager.

Parameters:
reservation - reservation describing the update
udd - status of the update
caller - identity of the caller
Throws:
java.lang.Exception

updateLease

void updateLease(ReservationClient reservation,
                 UpdateData udd,
                 AuthToken caller)
                 throws java.lang.Exception
Handles a lease update from an authority.

Role: Service Manager

Parameters:
reservation - reservation describing the update
udd - status of the update
caller - identity of the caller
Throws:
java.lang.Exception

export

void export(BrokerReservation reservation,
            AuthToken client)
            throws java.lang.Exception
Initiates a ticket export.

Role: Broker or Authority

Prepare/hold a ticket for "will call" claim by a client.

Parameters:
reservation - reservation to be exported
client - client identity
Throws:
java.lang.Exception

ticketRequest

void ticketRequest(BrokerReservation reservation,
                   AuthToken caller,
                   IClientCallbackProxy callback,
                   boolean compareSequenceNumbers)
                   throws java.lang.Exception
Processes an incoming request for a new ticket.

Role: Broker

Parameters:
reservation - reservation representing the ticket request
caller - caller identity
callback - callback object
compareSequenceNumbers - if true, the incoming sequence number will be compared to the local sequence number to detect fresh requests, if false, no comparison will be performed.
Throws:
java.lang.Exception

claimRequest

void claimRequest(BrokerReservation reservation,
                  AuthToken caller,
                  IClientCallbackProxy callback)
                  throws java.lang.Exception
Processes a request to claim a pre-reserved "will call" ticket.

Role: Broker

Parameters:
reservation - reservation describing the claim request
caller - caller identity
callback - callback proxy
Throws:
java.lang.Exception

redeemRequest

void redeemRequest(AuthorityReservation reservation,
                   AuthToken caller,
                   IServiceManagerCallbackProxy callback,
                   boolean compareSequenceNumbers)
                   throws java.lang.Exception
Processes an incoming request for a new lease.

Role: Authority

Parameters:
reservation - reservation representing the lease request. Must contain a valid ticket.
caller - caller identity
callback - callback object
compareSequenceNumbers - if true, the incoming sequence number will be compared to the local sequence number to detect fresh requests, if false, no comparison will be performed.
Throws:
java.lang.Exception

extendTicketRequest

void extendTicketRequest(BrokerReservation reservation,
                         AuthToken caller,
                         boolean compareSequenceNumbers)
                         throws java.lang.Exception
Processes an incoming request for a ticket extension.

Role: Broker

Parameters:
reservation - reservation representing the ticket extension request.
caller - caller identity
compareSequenceNumbers - if true, the incoming sequence number will be compared to the local sequence number to detect fresh requests, if false, no comparison will be performed.
Throws:
java.lang.Exception

extendLeaseRequest

void extendLeaseRequest(AuthorityReservation reservation,
                        AuthToken caller,
                        boolean compareSequenceNumbers)
                        throws java.lang.Exception
Processes an incoming request for a lease extension.

Role: Authority

Parameters:
reservation - reservation representing the lease extension request.
caller - caller identity
compareSequenceNumbers - if true, the incoming sequence number will be compared to the local sequence number to detect fresh requests, if false, no comparison will be performed.
Throws:
java.lang.Exception

closeRequest

void closeRequest(ResourceReservation reservation,
                  AuthToken caller,
                  boolean compareSequenceNumbers)
                  throws java.lang.Exception
Processes an incoming request to close a reservation.

Role: Authority

Parameters:
reservation - reservation to close.
caller - caller identity
compareSequenceNumbers - if true, the incoming sequence number will be compared to the local sequence number to detect fresh requests, if false, no comparison will be performed.
Throws:
java.lang.Exception


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