class FileDao[S] extends StateDao[S]
A file-based StateDao implementation which writes a '.latestSnapshotIndex' file under the given directory to track what the last snapshot taken was
It then writes down snapshot-X files to contain the persisted snapshots
- S
the snapshot type
- Alphabetic
- By Inheritance
- FileDao
- StateDao
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
FileDao(dataDir: Path, empty: ⇒ S, numberToKeep: Option[Int])(implicit arg0: FromBytes[S], arg1: ToBytes[S])
- dataDir
the directory under which files will be written
- empty
the default empty state
- numberToKeep
if specified, snapshots older than this value will be removed at the point the new snapshots are written
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
latestSnapshot(): Try[(LogIndex, S)]
means to get the latest snapshot index and state.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
writeDown(coords: LogCoords, s: S): Unit
saves the snapshot together w/ the most recent log entry (coords) which were applied to it