Skip to content

Instantly share code, notes, and snippets.

@jonvuri
Last active March 30, 2016 16:30
Show Gist options
  • Select an option

  • Save jonvuri/ee29cb87ac4b4f3532555fcee0b39a3d to your computer and use it in GitHub Desktop.

Select an option

Save jonvuri/ee29cb87ac4b4f3532555fcee0b39a3d to your computer and use it in GitHub Desktop.
val managerOne: ManagerGetter[Manager[One]] = getManager(oneParam)
managerOne.get().write(one.key, one)
managerOne.flush()
// getManager(param: String): Manager[T]
// val one: One
// val two: Two
// val three: Three
// val four: Four
// ?
def write(t: T) = {
// ?
}
val managerOne = getManager(oneParam)
(managerOne.get(): Manager[One]).write(one.key, one)
managerOne.flush()
val managerTwo = getManager(twoParam)
(managerTwo.get(): Manager[Two]).write(two.key, two)
managerTwo.flush()
val managerThree = getManager(threeParam)
(managerThree.get(): Manager[Three]).write(three.key, three)
managerThree.flush()
val managerFour = getManager(fourParam)
(managerFour.get(): Manager[Four]).write(four.key, four)
managerFour.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment