public interface GameStateManagerService
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSetState(Object syncKey,
Object state)
This method is actually a combination of compareAndSetSyncKey and
setState.
|
boolean |
compareAndSetSyncKey(Object key)
Method used to achieve synchronization while doing state management.
|
Object |
computeAndSetNextState(Object state,
Object syncKey,
Object stateAlgorithm) |
Object |
computeNextState(Object state,
Object syncKey,
Object stateAlgorithm) |
Object |
getAndSetState(Object state)
Set the state of the object.
|
byte[] |
getSerializedByteArray()
Whenever serialization is done from Java object to AMF3, or just plain
seriazlied java object, it should be saved in byte array format to the
state manager.
|
Object |
getState() |
Object |
getStateAlgorithm() |
Object |
getSyncKey()
Method used to retrieve the synchronization key object.
|
void |
setSerializedByteArray(byte[] serializedBytes)
Whenever serialization is done from Java object to AMF3, or just plain
java serialized object, it should be saved in byte array format to the
state manager.
|
Object getState()
boolean compareAndSetSyncKey(Object key)
key
- The current state is wrapped in this object key.Object getAndSetState(Object state)
state
- boolean compareAndSetState(Object syncKey, Object state)
syncKey
- Sync key of the incoming objectstate
- The new state to be set.Object getSyncKey()
byte[] getSerializedByteArray()
void setSerializedByteArray(byte[] serializedBytes) throws UnsupportedOperationException
serializedBytes
- the serialized AMF3 or other object in byte array format.UnsupportedOperationException
Object computeNextState(Object state, Object syncKey, Object stateAlgorithm) throws UnsupportedOperationException
UnsupportedOperationException
Object computeAndSetNextState(Object state, Object syncKey, Object stateAlgorithm) throws UnsupportedOperationException
UnsupportedOperationException
Object getStateAlgorithm() throws UnsupportedOperationException
UnsupportedOperationException
Copyright © 2013. All Rights Reserved.