|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.kernel.Slice
public class Slice
Slice implementation. A slice has a globally unique identifier, name, description, property list, an owning identity, an access control list, and a set of reservations.
This class is used within the Service Manager, which may hold reservations on many sites; on the Broker, which may have provided tickets to the slice for reservations at many sites; and on the site Authority, where each slice may hold multiple reservations for resources at that site.
| Field Summary | |
|---|---|
protected IController |
controller
Controller associated with the slice. |
protected java.lang.String |
description
Description string. |
protected Guard |
guard
Access control monitor. |
protected SliceID |
guid
Globally unique identifier. |
protected AuthToken |
owner
The owner of the slice. |
static java.lang.String |
PropertyClass
|
static java.lang.String |
PropertyController
|
static java.lang.String |
PropertyControllerClass
|
static java.lang.String |
PropertyDescription
|
static java.lang.String |
PropertyGuard
|
static java.lang.String |
PropertyGuid
|
static java.lang.String |
PropertyName
|
static java.lang.String |
PropertyOwner
|
static java.lang.String |
PropertyProperties
|
static java.lang.String |
PropertyResourceType
|
static java.lang.String |
PropertyType
|
protected ReservationSet |
reservations
The reservations in this slice. |
protected ResourceType |
resourceType
Resource type associated with this slice. |
protected ResourceData |
rsrcdata
A collection of property lists inherited by each reservation in this slice. |
protected java.lang.String |
slicename
Slice name. |
protected java.lang.String |
type
The slice type: inventory or client. |
| Constructor Summary | |
|---|---|
Slice()
Creates a new "blank" instance. |
|
Slice(SliceID id,
java.lang.String name)
Creates a new slice with the given identifier. |
|
Slice(SliceID id,
java.lang.String name,
ResourceData rdata)
Create a new slice with the given name and properties. |
|
Slice(java.lang.String name)
Creates a new slice with the given name. |
|
Slice(java.lang.String name,
ResourceData rdata)
Create a new slice with the given name and properties. |
|
| Method Summary | |
|---|---|
Slice |
cloneRequest()
Makes a minimal clone of this slice object sufficient for cross-actor calls. |
static Slice |
createInstance(java.util.Properties p)
Creates a slice object from a saved properties list. |
java.util.Properties |
getConfigurationProperties()
Returns the slice configuration properties list (byte reference). |
IController |
getController()
Returns the slice controller. |
java.lang.String |
getDescription()
Returns the slice description. |
java.util.Properties |
getLocalProperties()
Returns the slice local properties list (by reference). |
java.lang.String |
getName()
Returns the slice name. |
static java.lang.String |
getName(java.util.Properties p)
Returns the slice name stored in a saved properties list. |
AuthToken |
getOwner()
Returns the slice owner. |
java.util.Properties |
getRequestProperties()
Returns the slice request properties list (by reference). |
protected ReservationSet |
getReservations()
Returns the reservation set. |
protected ResourceReservation[] |
getReservationsArray()
Returns the reservation set represented as an array. |
ResourceData |
getResourceData()
Returns the slice properties. |
java.util.Properties |
getResourceProperties()
Returns the slice resource properties list (by reference). |
ResourceType |
getResourceType()
Returns the resource type of the slice. |
SliceID |
getSliceID()
Returns the slice identifier. |
static SliceID |
getSliceID(java.util.Properties p)
Returns the slice identifier stored in a saved properties list. |
Guard |
Guard()
Returns the slice guard. |
boolean |
isBrokerClient()
Checks if the slice is a broker client slice (a client slice within an authority that represents a broker). |
static boolean |
isBrokerClient(java.util.Properties p)
Checks if the saved properties list represents a broker client slice. |
boolean |
isClient()
Checks if the slice is a client slice. |
static boolean |
isClient(java.util.Properties p)
Checks if the saved properties list represents a client slice. |
protected boolean |
isEmpty()
Checks if the slice is empty. |
boolean |
isInventory()
Checks if the slice is an inventory slice. |
static boolean |
isInventory(java.util.Properties p)
Checks if the saved properties list represents an inventory slice. |
protected void |
prepare()
Prepares to register a new slice. |
protected void |
register(ResourceReservation r)
Registers a new reservation. |
void |
reset(java.util.Properties p)
De-serializes the object from the given properties list. |
void |
revisit(IActor actor,
java.util.Properties p)
|
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. |
void |
setBrokerClient()
Marks the slice as a broker client slice (a client slice within an authority that represents a broker). |
void |
setClient()
Marks the slice as a client slice. |
void |
setController(IController controller)
Attaches the controller for the slice. |
void |
setDescription(java.lang.String description)
Sets the slice description. |
void |
setGuard(Guard g)
Sets the slice guard. |
void |
setInventory(boolean value)
Controls the inventory flag. |
void |
setName(java.lang.String name)
Sets the slice name. |
void |
setOwner(AuthToken auth)
Sets the slice owner. |
void |
setResourceData(ResourceData rsrcdata)
Sets the slice properties. |
void |
setResourceType(ResourceType resourceType)
Sets the slice resource type. |
protected ResourceReservation |
softLookup(ReservationID rid)
Looks up a reservation by ID but do not throw error |
java.lang.String |
toString()
|
protected void |
unregister(ResourceReservation r)
Unregisters the reservation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PropertyControllerClass
public static final java.lang.String PropertyController
public static final java.lang.String PropertyType
public static final java.lang.String PropertyDescription
public static final java.lang.String PropertyOwner
public static final java.lang.String PropertyGuard
public static final java.lang.String PropertyClass
public static final java.lang.String PropertyName
public static final java.lang.String PropertyProperties
public static final java.lang.String PropertyResourceType
public static final java.lang.String PropertyGuid
protected SliceID guid
protected java.lang.String slicename
protected java.lang.String description
protected ResourceData rsrcdata
protected java.lang.String type
protected AuthToken owner
protected Guard guard
protected ReservationSet reservations
protected ResourceType resourceType
protected IController controller
| Constructor Detail |
|---|
public Slice()
public Slice(java.lang.String name)
name - slice name
public Slice(SliceID id,
java.lang.String name)
id - slice identifiername - slice name
public Slice(java.lang.String name,
ResourceData rdata)
name - slice namerdata - properties
public Slice(SliceID id,
java.lang.String name,
ResourceData rdata)
id - slice identifiername - slice namerdata - properties| Method Detail |
|---|
public java.util.Properties save()
throws java.lang.Exception
ISerialize
save in interface ISerializejava.lang.Exception
public void save(java.util.Properties p)
throws java.lang.Exception
ISerialize
save in interface ISerializep - properties list to serialize the object into
java.lang.Exception
public void reset(java.util.Properties p)
throws java.lang.Exception
ISerialize
reset in interface ISerializep - properties list containing the serialized version of
the object
java.lang.Exception
public void revisit(IActor actor,
java.util.Properties p)
throws java.lang.Exception
java.lang.Exceptionpublic Slice cloneRequest()
ISlice
cloneRequest in interface ISlicepublic java.lang.String toString()
toString in class java.lang.Object
protected void prepare()
throws java.lang.Exception
java.lang.Exception
protected void register(ResourceReservation r)
throws java.lang.Exception
r - the new reservation
java.lang.Exceptionprotected void unregister(ResourceReservation r)
r - the reservation
java.lang.Exceptionprotected ResourceReservation softLookup(ReservationID rid)
rid - the reservation ID
java.lang.Exceptionprotected boolean isEmpty()
protected ReservationSet getReservations()
protected ResourceReservation[] getReservationsArray()
public static Slice createInstance(java.util.Properties p)
throws java.lang.Exception
p - properties list describing a previous slice object instance
java.lang.Exceptionpublic static boolean isInventory(java.util.Properties p)
p - properties list
public static boolean isClient(java.util.Properties p)
p - properties list
public static boolean isBrokerClient(java.util.Properties p)
p - properties list
public static java.lang.String getName(java.util.Properties p)
p - properties list
public static SliceID getSliceID(java.util.Properties p)
p - properties list
public java.util.Properties getLocalProperties()
ISlice
getLocalProperties in interface ISlicepublic java.util.Properties getRequestProperties()
ISlice
getRequestProperties in interface ISlicepublic java.util.Properties getResourceProperties()
ISlice
getResourceProperties in interface ISlicepublic java.util.Properties getConfigurationProperties()
ISlice
getConfigurationProperties in interface ISlicepublic void setInventory(boolean value)
ISlice
setInventory in interface ISlicevalue - inventory status: true, inventory slice, false, client slicepublic boolean isInventory()
ISlice
isInventory in interface ISlicepublic boolean isClient()
ISlice
isClient in interface ISlicepublic void setClient()
ISlice
setClient in interface ISlicepublic boolean isBrokerClient()
ISlice
isBrokerClient in interface ISlicepublic void setBrokerClient()
ISlice
setBrokerClient in interface ISlicepublic java.lang.String getName()
ISlice
getName in interface ISlicepublic void setName(java.lang.String name)
ISlice
setName in interface ISlicename - slice name to setpublic void setOwner(AuthToken auth)
ISlice
setOwner in interface ISliceauth - the slice ownerpublic AuthToken getOwner()
ISlice
getOwner in interface ISlicepublic void setGuard(Guard g)
ISlice
setGuard in interface ISliceg - the guardpublic Guard Guard()
ISlice
Guard in interface ISlicepublic ResourceData getResourceData()
ISlice
getResourceData in interface ISlicepublic void setResourceData(ResourceData rsrcdata)
ISlice
setResourceData in interface ISlicepublic java.lang.String getDescription()
ISlice
getDescription in interface ISlicepublic void setDescription(java.lang.String description)
ISlice
setDescription in interface ISlicedescription - the descriptionpublic void setController(IController controller)
ISlice
setController in interface ISlicecontroller - slice controllerpublic IController getController()
ISlice
getController in interface ISlicepublic ResourceType getResourceType()
ISlice
getResourceType in interface ISlicepublic void setResourceType(ResourceType resourceType)
ISlice
setResourceType in interface ISliceresourceType - resource typepublic SliceID getSliceID()
ISlice
getSliceID in interface ISlice
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||