|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.agent.AgentStore
public class AgentStore
Handle for agent storage space. An agent can carry along data with it. Usually the entire object graph of an agent is serialized upon migration, which may be too expensive for large data (like audio or video content). Therefore the data can also be kept in the Agent Container of the agent, so we have no useless (un)marshalling of data everytime an agent migrates. Agents that are not written in Java require agent stores because they usually need to do manual serialization of their state. This can also be done using agent store. Creating, listing and deleting agent stores is generally done using the @see org.iids.aos.agent.AgentScape interface.
| Constructor Summary | |
|---|---|
AgentStore(int agentContainerID,
int segmentID,
KernelClient kernelClient,
Cookie kernelCookie)
Create new agent store handle 'by reference'. |
|
AgentStore(java.lang.String description,
int agentContainerID,
KernelClient kernelClient,
Cookie kernelCookie,
byte[] data)
Create new agent store. |
|
| Method Summary | |
|---|---|
void |
delete()
Delete the AgentStore from the AgentContainer. |
java.lang.String |
description()
Get description (meta data) of AgentStore. |
byte[] |
read()
Read data stored in the AgentContainer. |
int |
segmentID()
Get AgentContainer segment id in which the AgentStore resides. |
int |
size()
Return the size of the data in the agent store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentStore(java.lang.String description,
int agentContainerID,
KernelClient kernelClient,
Cookie kernelCookie,
byte[] data)
throws KernelException
This constructor creates a new segment in AOS.
description - Meta-data of agent store. Max 255 chars long.agentContainerID - ID of the agent container to store the segmentkernelClient - AOS kernel client handle.kernelCookie - Cookie to identify the role to use.data - Data to store in the AgentStore.
KernelException - If the store could not be created.
public AgentStore(int agentContainerID,
int segmentID,
KernelClient kernelClient,
Cookie kernelCookie)
throws UnknownStoreIDException
agentContainerID - ID of the agent container to store the segmentsegmentID - ID of the segment which contains the agent storekernelClient - AOS kernel client handle.kernelCookie - Cookie to identify the role to use.
UnknownStoreIDException - If the segment contains no agent store
or for some other reason (KernelException) the agent store cannot be
accessed.| Method Detail |
|---|
public java.lang.String description()
public int segmentID()
public int size()
public byte[] read()
throws KernelException
KernelException - If the data cannot be read from the kernel.
public void delete()
throws KernelException
KernelException - If the AgentStore could not be deleted.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||