GemFireMemcachedServer (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.memcached, class: GemFireMemcachedServer

Package org.apache.geode.memcached

# Class GemFireMemcachedServer

java.lang.Object
org.apache.geode.memcached.GemFireMemcachedServer

public class GemFireMemcachedServer extends Object
This is the Server that listens for incoming memcached client connections. This server understands the memcached ASCII protocol documented in memcached source control It then translates these commands to the corresponding GemFire commands, and stores the data in GemFire in a `Region` named "gemcached".

"gemcached" region is `RegionShortcut.PARTITION` by default, though a cache.xml can be provided to override region attributes. This class has a Main method that can be used to start the server.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `GemFireMemcachedServer.Protocol`
  The protocol used by GemFireMemcachedServer

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `REGION_NAME`
  Name of the GemFire region in which data is stored, value id "gemcached"
  `static final String`
  `version`
  version of gemcached server

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GemFireMemcachedServer(int port)`
  Create an instance of the server.
  `GemFireMemcachedServer(String bindAddress, int port, GemFireMemcachedServer.Protocol protocol)`
  Create an instance of the server.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `main(String[] args)`
  `void`
  `shutdown()`
  shuts down this server and closes the embedded GemFire caching node
  `void`
  `start()`
  Starts an embedded GemFire caching node, and then listens for new memcached client connections.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### REGION_NAME

    public static final String REGION_NAME
    Name of the GemFire region in which data is stored, value id "gemcached"
    See Also:
      - Constant Field Values

  - ### version

    public static final String version
    version of gemcached server
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### GemFireMemcachedServer

    public GemFireMemcachedServer(int port)
    Create an instance of the server. to start the server `start()` must be called.
    Parameters:
      `port` - the port on which the server listens for new memcached client connections.

  - ### GemFireMemcachedServer

    public GemFireMemcachedServer(String bindAddress, int port, GemFireMemcachedServer.Protocol protocol)
    Create an instance of the server. to start the server `start()` must be called.
    Parameters:
      `bindAddress` - the address on which the server listens for new memcached client connections.
      `port` - the port on which the server listens for new memcached client connections.
      `protocol` - the protocol that this server should understand
    See Also:
      - `GemFireMemcachedServer.Protocol`

- ## Method Details

  - ### start

    public void start()
    Starts an embedded GemFire caching node, and then listens for new memcached client connections.

  - ### shutdown

    public void shutdown()
    shuts down this server and closes the embedded GemFire caching node

  - ### main

    public static void main(String[] args)