Class Overview
Implementation of SharedStateStorage
using a drools
StatefulKnowledgeSession.
Summary
Public Methods |
void
|
change(String name, UUID participantID, Serializable value)
Change a shared state value for a given agent to a given value.
|
void
|
change(String name, UUID participantID, StateTransformer change)
Modify a shared state value for a given agent.
|
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.
|
void
|
changeGlobal(String name, StateTransformer change)
Modify a global shared state value.
|
void
|
create(String name, UUID participantID, Serializable value)
Create a shared state value for a given agent.
|
void
|
create(ParticipantSharedState state)
Create a shared state value for a given agent.
|
void
|
createGlobal(String name, Serializable value)
Create a value in the global shared state.
|
void
|
createGlobal(SharedState state)
Create a value in the global shared state.
|
void
|
delete(String name, UUID participantID)
Delete a shared state value for a given agent.
|
void
|
deleteGlobal(String name)
Delete a value in the global shared state.
|
StatefulKnowledgeSession
|
get()
|
Serializable
|
get(String name, UUID participantID)
Get a shared state value for an individual agent.
|
Serializable
|
getGlobal(String name)
Get a global shared state value.
|
KnowledgeBase
|
getKbase()
|
void
|
incrementTime()
|
void
|
setEventBus(EventBus e)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
com.google.inject.Provider
|
From interface
javax.inject.Provider
|
From interface
uk.ac.imperial.presage2.core.TimeDriven
|
From interface
uk.ac.imperial.presage2.core.environment.EnvironmentSharedStateAccess
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 Constructors
Public Methods
public
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.
|
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
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.
|
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
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. |
Create a shared state value for a given agent.
Value will be created in the current time cycle.
public
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. |
public
void
createGlobal
(SharedState state)
Create a value in the global shared state.
Value will be created in the current time cycle.
public
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
void
deleteGlobal
(String name)
Delete a value in the global shared state.
Parameters
name
| String key name of the value to create.
|
public
StatefulKnowledgeSession
get
()
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.
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.
public
KnowledgeBase
getKbase
()
public
void
incrementTime
()
Protected Methods
protected
Map<String, FactHandle>
initGlobalStateMap
()
protected
void
updateState
()