Package net.sodacan.core.persist.rocks
Class RocksPersister
java.lang.Object
net.sodacan.core.persist.AbstractPersister
net.sodacan.core.persist.rocks.RocksPersister
- All Implemented Interfaces:
Persister
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
The framework calls the begin method when it is about to execute what might turn out to be a series of calls to this persister that should be considered as a single transaction.void
commit()
This method is called when the framework has concluded a series of writes that could be rolled back in case of an error.protected byte[]
byte[]
This method is called by the framework when an actor's processMessage method is about to be called for the first time after the Actor has been instantiated.void
rollback()
When a series of writes should be rolled back: not written in the first place, replaced with a previous version, etc.void
The save method is called by the framework when an actor's state has been updated.Methods inherited from class net.sodacan.core.persist.AbstractPersister
getActorId, getConfig, makeFile, makeFolder, makeTypeFolder
-
Constructor Details
-
RocksPersister
-
-
Method Details
-
begin
public void begin()Description copied from interface:Persister
The framework calls the begin method when it is about to execute what might turn out to be a series of calls to this persister that should be considered as a single transaction. -
commit
public void commit()Description copied from interface:Persister
This method is called when the framework has concluded a series of writes that could be rolled back in case of an error. -
rollback
public void rollback()Description copied from interface:Persister
When a series of writes should be rolled back: not written in the first place, replaced with a previous version, etc. -
fullKey
-
write
Description copied from interface:Persister
The save method is called by the framework when an actor's state has been updated. The key provided is unique id within an actor instance. The key can be anything but by convention it is either "actor" meaning all of the scalar attributes of the actor with @Save annotation. For collections, the key is a combination of the @Save name, a dollar sign, and the key used in a map collection. For a set, the key is the unique id of the set entry, the same as used in the equals method for the set. The ActorId was provided during construction of this persister.- Parameters:
fieldName
-bytes
-
-
read
Description copied from interface:Persister
This method is called by the framework when an actor's processMessage method is about to be called for the first time after the Actor has been instantiated.- Parameters:
fieldName
-
-