Skip to content

Commit

Permalink
Merge pull request #251 from rubanm/memcache_mergeable_monoid
Browse files Browse the repository at this point in the history
Memcache mergeable - use semigroup
  • Loading branch information
johnynek committed Dec 12, 2014
2 parents 841b2e7 + 9ba477e commit 19f1f08
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 19f1f08

Please sign in to comment.