orca.shirako.api
Interface IClientActor

All Superinterfaces:
IActor, IActorIdentity, IActorPublic, IClientPublic, IInitialize, IRecover, IReservationOperations, ISerialize, ISliceOperations, ITick
All Known Subinterfaces:
IBroker, IServiceManager
All Known Implementing Classes:
Broker, ServiceManager

public interface IClientActor
extends IActor, IClientPublic

IClientActor defines the common functionality for actors acting as clients of other actors (service managers and brokers). Every client actor is connected to one or more server actors. Each server actor is represented as a proxy object. Client actors maintain a registry of proxies to server actors that they are connected to. Proxies to actors acting in the broker role are explicitly managed. Proxies for actors acting in the site authority role are automatically managed as they are embedded in tickets sent from brokers.


Field Summary
 
Fields inherited from interface orca.shirako.api.IActor
PropertyClass, PropertyGuid, PropertyName, TypeAll, TypeBroker, TypeServiceManager, TypeSiteAuthority
 
Method Summary
 void addBroker(IBrokerProxy broker)
          Registers a broker.
 ReservationClient claim(ReservationID reservationID, ResourceSet resources)
          Claims already exported resources from the default upstream broker.
 ReservationClient claim(ReservationID reservationID, ResourceSet resources, IBrokerProxy broker)
          Claims already exported resources from the given broker.
 ReservationClient claim(ReservationID reservationID, ResourceSet resources, Slice slice, IBrokerProxy broker)
          Claims already exported resources from the given broker.
 void demand(ReservationClient reservation)
          Injects a new resource demand into the demand stream.
 void extendTicket(ReservationClient reservation)
          Issues a ticket extend request for the given reservation.
 void extendTicket(ReservationSet set)
          Issues a ticket request for every reservation in the set.
 IBrokerProxy getBroker(java.lang.String name)
          Gets the broker proxy with the given name
 IBrokerProxy[] getBrokers()
          Returns all brokers registered with the actor.
 IBrokerProxy getDefaultBroker()
          Returns the default broker.
 void ticket(ReservationClient reservation)
          Issues a ticket request for the given reservation.
 void ticket(ReservationSet set)
          Issues a ticket request for every reservation in the set.
 
Methods inherited from interface orca.shirako.api.IActor
actorAdded, getActorClock, getCurrentCycle, getDescription, getLogger, getPolicy, getShirakoPlugin, getType, initializeKeyStore, isFromDatabase, isRecovered, isStopped, recover, setActorClock, setDescription, setGuid, setIdentity, setLogger, setPolicy, setRecovered, setShirakoPlugin, start, stop
 
Methods inherited from interface orca.shirako.api.ITick
externalTick
 
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.IActorPublic
query
 
Methods inherited from interface orca.shirako.api.IActorIdentity
getGuid, getIdentity, getName
 
Methods inherited from interface orca.shirako.api.ISliceOperations
getClientSlices, getInventorySlices, getSlice, getSlices, registerSlice, removeSlice, removeSlice, reregisterSlice, unregisterSlice, unregisterSlice
 
Methods inherited from interface orca.shirako.api.IReservationOperations
close, close, close, extend, extend, getReservation, getReservations, register, removeReservation, removeReservation, reregister, unregister, unregister
 
Methods inherited from interface orca.shirako.api.IInitialize
initialize
 
Methods inherited from interface orca.shirako.api.IClientPublic
updateTicket
 

Method Detail

demand

void demand(ReservationClient reservation)
Injects a new resource demand into the demand stream. Reservation must be pre-initialized with resource set, term, properties, etc. The actor policy periodically examines the demand stream and determines what resources must be obtained and how. For example, the policy may choose to combine several reservation requests into one, split a reservation request onto multiple brokers, etc.

Parameters:
reservation - reservation representing resource demand

ticket

void ticket(ReservationClient reservation)
            throws java.lang.Exception
Issues a ticket request for the given reservation. Note: the reservation must have already been registered with the actor.

Parameters:
reservation - reservation to obtain a ticket for
Throws:
java.lang.Exception
See Also:
IReservationOperations#register(orca.shirako.kernel.Reservation)

ticket

void ticket(ReservationSet set)
Issues a ticket request for every reservation in the set. All exceptions are caught and logged but no exception is propagated. No information will be delivered to indicate that some failure has taken place, e.g., failure to communicate with a broker. Inspect the state of individual reservations to determine whether/what failures have taken place.

Parameters:
set - set of reservations to obtain tickets for

extendTicket

void extendTicket(ReservationClient reservation)
                  throws java.lang.Exception
Issues a ticket extend request for the given reservation. Note: the reservation must have already been registered with the actor.

Parameters:
reservation - reservation to extend the ticket for
Throws:
java.lang.Exception
See Also:
IReservationOperations#register(orca.shirako.kernel.Reservation)

extendTicket

void extendTicket(ReservationSet set)
Issues a ticket request for every reservation in the set. All exceptions are caught and logged but no exception is propagated. No information will be delivered to indicate that some failure has taken place, e.g., failure to communicate with a broker. Inspect the state of individual reservations to determine whether/what failures have taken place.

Parameters:
set - set of reservations to extend tickets for

claim

ReservationClient claim(ReservationID reservationID,
                        ResourceSet resources)
                        throws java.lang.Exception
Claims already exported resources from the default upstream broker. The reservation will be stored in the default slice.

Parameters:
reservationID - reservation identifier of the exported reservation
resources - resource set describing the resources to claim
Throws:
java.lang.Exception

claim

ReservationClient claim(ReservationID reservationID,
                        ResourceSet resources,
                        IBrokerProxy broker)
                        throws java.lang.Exception
Claims already exported resources from the given broker. The reservation will be stored in the default slice.

Parameters:
reservationID - reservation identifier of the exported reservation
resources - resource set describing the resources to claim
broker - broker proxy
Throws:
java.lang.Exception

claim

ReservationClient claim(ReservationID reservationID,
                        ResourceSet resources,
                        Slice slice,
                        IBrokerProxy broker)
                        throws java.lang.Exception
Claims already exported resources from the given broker.

Parameters:
reservationID - reservation identifier of the exported reservation
resources - resource set describing the resources to claim
slice - slice in which to store the claimed reservation. As of now, it is assumed that the exported reservation is stored under a slice with the same name in the upstream broker.
Throws:
java.lang.Exception

addBroker

void addBroker(IBrokerProxy broker)
Registers a broker. If this is the first broker to be registered, it is set as the default broker.

Parameters:
broker - broker to register

getBroker

IBrokerProxy getBroker(java.lang.String name)
Gets the broker proxy with the given name

Parameters:
name - broker name
Returns:
requested broker

getDefaultBroker

IBrokerProxy getDefaultBroker()
Returns the default broker.

Returns:
the default broker

getBrokers

IBrokerProxy[] getBrokers()
Returns all brokers registered with the actor.

Returns:
an array of brokers


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