splitted kernel up in core + many sub modules
This commit is contained in:
parent
deeaa923d1
commit
ab6637044f
154 changed files with 1510 additions and 2651 deletions
33
akka-persistence/src/main/scala/Storage.scala
Normal file
33
akka-persistence/src/main/scala/Storage.scala
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package se.scalablesolutions.akka.kernel.state
|
||||
|
||||
// abstracts persistence storage
|
||||
trait Storage {
|
||||
}
|
||||
|
||||
// for Maps
|
||||
trait MapStorage extends Storage {
|
||||
def insertMapStorageEntriesFor(name: String, entries: List[Tuple2[AnyRef, AnyRef]])
|
||||
def insertMapStorageEntryFor(name: String, key: AnyRef, value: AnyRef)
|
||||
def removeMapStorageFor(name: String)
|
||||
def removeMapStorageFor(name: String, key: AnyRef)
|
||||
def getMapStorageEntryFor(name: String, key: AnyRef): Option[AnyRef]
|
||||
def getMapStorageSizeFor(name: String): Int
|
||||
def getMapStorageFor(name: String): List[Tuple2[AnyRef, AnyRef]]
|
||||
def getMapStorageRangeFor(name: String, start: Option[AnyRef],
|
||||
finish: Option[AnyRef], count: Int): List[Tuple2[AnyRef, AnyRef]]
|
||||
}
|
||||
|
||||
// for vectors
|
||||
trait VectorStorage extends Storage {
|
||||
def insertVectorStorageEntryFor(name: String, element: AnyRef)
|
||||
def insertVectorStorageEntriesFor(name: String, elements: List[AnyRef])
|
||||
def getVectorStorageEntryFor(name: String, index: Int): AnyRef
|
||||
def getVectorStorageRangeFor(name: String, start: Option[Int], finish: Option[Int], count: Int): List[AnyRef]
|
||||
def getVectorStorageSizeFor(name: String): Int
|
||||
}
|
||||
|
||||
// for Ref
|
||||
trait RefStorage extends Storage {
|
||||
def insertRefStorageFor(name: String, element: AnyRef)
|
||||
def getRefStorageFor(name: String): Option[AnyRef]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue