Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memcache mergeable - use semigroup #251

Merged
merged 2 commits into from
Dec 12, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.twitter.storehaus.memcache

import com.twitter.algebird.Monoid
import com.twitter.algebird.Semigroup
import com.twitter.bijection.{ Bijection, Codec, Injection }
import com.twitter.bijection.netty.Implicits._
import com.twitter.conversions.time._
Expand Down Expand Up @@ -92,10 +92,10 @@ object MemcacheStore {
/**
* Returns a Memcache-backed MergeableStore[K, V] that uses
* implicitly-supplied Injection instances from K and V ->
* Array[Byte] to manage type conversion. The Monoid[V] is also
* Array[Byte] to manage type conversion. The Semigroup[V] is also
* pulled in implicitly.
*/
def mergeable[K: Codec, V: Codec: Monoid](client: Client, keyPrefix: String,
def mergeable[K: Codec, V: Codec: Semigroup](client: Client, keyPrefix: String,
ttl: Duration = DEFAULT_TTL, flag: Int = DEFAULT_FLAG): MergeableStore[K, V] =
MergeableStore.fromStore(
MemcacheStore.typed(client, keyPrefix, ttl, flag)
Expand Down