Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A minimal Voldemort wrapper written in scala
Scala
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
project
src
.gitignore
README

README

A minimal wrapper for Voldemort client written in Scala

# Example usage

1 - start Voldemort
2 - sbt console
3 - run some commands:

  scala> import minimal.voldemort.client._ 
  import minimal.voldemort.client._

  scala> val c = SimpleVoldemortClient[String, String]("test", "tcp://localhost:6666")
  c: minimal.voldemort.client.SimpleVoldemortClient[String,String] = minimal.voldemort.client.SimpleVoldemortClient@632b6836

  scala> c.get("ale")
  res0: Option[String] = None

  scala> c.put("ale", "Crosa")

  scala> c.get("ale")
  res2: Option[String] = Some(Crosa)

  scala> c.get(List("ale", "c", "none?"))
  res3: scala.collection.Map[String,voldemort.versioning.Versioned[String]] = Map((ale,[Crosa, version(0:1)]))
  
# Shared configuration

  scala> import minimal.voldemort.client._
  import minimal.voldemort.client._

  scala> val config = SimpleVoldemortConfig(List("tcp://localhost:6666"))(_.setFailureDetectorBannagePeriod(5000))
  config: minimal.voldemort.client.SimpleVoldemortConfig = SimpleVoldemortConfig(List(tcp://localhost:6666),Some(<function1>))

  scala> val test1 = SimpleVoldemortClient[String,String]("test1", config)
  test1: minimal.voldemort.client.SimpleVoldemortClient[String,String] = minimal.voldemort.client.SimpleVoldemortClient@742430a2

  scala> val test2 = config.getStoreClient[String,String]("test2")
  test2: minimal.voldemort.client.SimpleVoldemortClient[String,String] = minimal.voldemort.client.SimpleVoldemortClient@742430a2

Something went wrong with that request. Please try again.