public interface

EnvironmentSharedStateAccess

uk.ac.imperial.presage2.core.environment.EnvironmentSharedStateAccess
Known Indirect Subclasses

Class Overview

This is the access layer to the shared state of the environment.

Summary

Public Methods
abstract void change(String name, UUID participantID, Serializable value)

Change a shared state value for a given agent to a given value.

abstract void change(String name, UUID participantID, StateTransformer change)

Modify a shared state value for a given agent.

abstract void changeGlobal(String name, Serializable value)

Change a global shared state value to a given new value,

Value will not be changed until the next time slice.

abstract void changeGlobal(String name, StateTransformer change)

Modify a global shared state value.

abstract void create(String name, UUID participantID, Serializable value)

Create a shared state value for a given agent.

abstract void create(ParticipantSharedState state)

Create a shared state value for a given agent.

abstract void createGlobal(String name, Serializable value)

Create a value in the global shared state.

abstract void createGlobal(SharedState state)

Create a value in the global shared state.

abstract void delete(String name, UUID participantID)

Delete a shared state value for a given agent.

abstract void deleteGlobal(String name)

Delete a value in the global shared state.

abstract Serializable get(String name, UUID participantID)
Get a shared state value for an individual agent.
abstract Serializable getGlobal(String name)
Get a global shared state value.

Public Methods

public abstract void change (String name, UUID participantID, Serializable value)

Change a shared state value for a given agent to a given value.

Value will not be changed until the next time slice.

Parameters
name String key of the value to change
participantID UUID of the agent
value StateTransformer which will perform the change.

public abstract void change (String name, UUID participantID, StateTransformer change)

Modify a shared state value for a given agent.

Value will not be changed until the next time slice.

Parameters
name String key of the value to change
participantID UUID of the agent
change StateTransformer which will perform the change.

public abstract void changeGlobal (String name, Serializable value)

Change a global shared state value to a given new value,

Value will not be changed until the next time slice.

Parameters
name String key name of the value to be changed.
value New value to be set.

public abstract void changeGlobal (String name, StateTransformer change)

Modify a global shared state value.

Value will not be changed until the next time slice.

Parameters
name String key name of the value to be changed.
change StateTransformer which will perform the change.

public abstract void create (String name, UUID participantID, Serializable value)

Create a shared state value for a given agent.

Value will be created in the current time cycle.

Parameters
name String key of the value to change
participantID UUID of the agent
value Initial value to set state to.
Throws
SharedStateAccessException if state with the same key already exists.

public abstract void create (ParticipantSharedState state)

Create a shared state value for a given agent.

Value will be created in the current time cycle.

Parameters
state ParticipantSharedState describing the state to create.
Throws
SharedStateAccessException if state with the same key already exists.

public abstract void createGlobal (String name, Serializable value)

Create a value in the global shared state.

Value will be created in the current time cycle.

Parameters
name String key name of the value to create.
value Initial value to set state to.
Throws
SharedStateAccessException if state with the same key already exists.

public abstract void createGlobal (SharedState state)

Create a value in the global shared state.

Value will be created in the current time cycle.

Parameters
state SharedState describing the state to create.
Throws
SharedStateAccessException if state with the same key already exists.

public abstract void delete (String name, UUID participantID)

Delete a shared state value for a given agent.

Parameters
name String key of the value to change
participantID UUID of the agent

public abstract void deleteGlobal (String name)

Delete a value in the global shared state.

Parameters
name String key name of the value to create.

public abstract Serializable get (String name, UUID participantID)

Get a shared state value for an individual agent.

Parameters
name String key of the value to get
participantID UUID of the agent
Returns
  • Serializable value if it exists in the state for this agent, null otherwise.

public abstract Serializable getGlobal (String name)

Get a global shared state value.

Parameters
name String key name of the value
Returns
  • Serializable value if it exists in the state, null otherwise.