Skip to content

Instantly share code, notes, and snippets.

@macalinao
Created May 15, 2017 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macalinao/e1f9f1bfd7ed1832f7b449320dabb3c7 to your computer and use it in GitHub Desktop.
Save macalinao/e1f9f1bfd7ed1832f7b449320dabb3c7 to your computer and use it in GitHub Desktop.
package io.asuna.cantor.model
/**
* A store supports read and write operations.
* Storage implementations should implement this.
*/
trait Store[K, V] extends Source[K, V] with Sink[K, V] {
/**
* Helper to treat this Store as a Source.
*/
def asSource: Source[K, V] = this
/**
* Helper to treat this Store as a Sink.
*/
def asSink: Sink[K, V] = this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment