Vertx Memcache Library

Standardized set of build tool configurations for Groupon API projects

License

License

GroupId

GroupId

com.groupon.vertx
ArtifactId

ArtifactId

vertx-memcache
Last Version

Last Version

4.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Vertx Memcache Library
Standardized set of build tool configurations for Groupon API projects
Project URL

Project URL

https://github.com/groupon/vertx-redis
Source Code Management

Source Code Management

https://github.com/groupon/vertx-memcache

Download vertx-memcache

How to add to project

<!-- https://jarcasting.com/artifacts/com.groupon.vertx/vertx-memcache/ -->
<dependency>
    <groupId>com.groupon.vertx</groupId>
    <artifactId>vertx-memcache</artifactId>
    <version>4.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.groupon.vertx/vertx-memcache/
implementation 'com.groupon.vertx:vertx-memcache:4.0.2'
// https://jarcasting.com/artifacts/com.groupon.vertx/vertx-memcache/
implementation ("com.groupon.vertx:vertx-memcache:4.0.2")
'com.groupon.vertx:vertx-memcache:jar:4.0.2'
<dependency org="com.groupon.vertx" name="vertx-memcache" rev="4.0.2">
  <artifact name="vertx-memcache" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.groupon.vertx', module='vertx-memcache', version='4.0.2')
)
libraryDependencies += "com.groupon.vertx" % "vertx-memcache" % "4.0.2"
[com.groupon.vertx/vertx-memcache "4.0.2"]

Dependencies

provided (4)

Group / Artifact Type Version
io.vertx : vertx-core jar 3.5.4
io.vertx : vertx-codegen jar 3.5.4
com.groupon.vertx : vertx-utils jar 3.4.1
com.yammer.metrics : metrics-core jar 2.2.0

test (4)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.21
ch.qos.logback : logback-classic jar 1.1.3
junit : junit jar 4.12
org.mockito : mockito-all jar 1.10.19

Project Modules

There are no modules declared in this project.

vert.x-memcache

License: Apache 2 Travis Build Maven Artifact

This is an async library for sending commands to Memcache.

Usage

Configuration for Memcache Verticle:

{
    "memcacheClusterConfig": {
        "eventBusAddressPrefix": "address_where_memcache_handler_is_registered",
        "clusters": {
            "cluster_name_here": {
                "servers": ["hostname:11211"],
                "namespace": "memcache-namespace"
            }
        }
    }
}

Setting up a client and calling a simple get:

MemcacheClusterConfig memcacheConfig = new MemcacheClusterConfig(container.config().getObject("memcacheClusterConfig"));
MemcacheClusterClientFactory clientFactory = new MemcacheClusterClientFactory(vertx.eventBus(), memcacheConfig);
MemcacheClient memcacheClient = clientFactory.getClient("cluster_name_here");
Future<JsonObject> result = memcacheClient.get("some-key");

The JsonObject in the future result will be in a Jsend format. In the case of the get call above it will be similar to:

{
    "status": "success",
    "data": {
        "some-key": "value"
    }
}

Results in the data block will vary based on the Memcache method being called.

Building

Prerequisites:

Building:

vertx-memcache> mvn verify

To use the local version you must first install it locally:

vertx-memcache> mvn install

You can determine the version of the local build from the pom file. Using the local version is intended only for testing or development.

License

Published under Apache Software License 2.0, see LICENSE

© Groupon Inc., 2014

com.groupon.vertx

Groupon

Versions

Version
4.0.2
4.0.1
4.0.0
3.0.2
3.0.1