org.jgroups.blocks

## Class MemcachedConnector

- java.lang.Object
- - org.jgroups.blocks.MemcachedConnector

- All Implemented Interfaces:
    java.lang.Runnable

      public class MemcachedConnector
      extends java.lang.Object
      implements java.lang.Runnable

  Class which listens on a server socket for memcached clients, reads the requests, forwards them to an instance of PartitionedHashMap and sends the response. A memcached client should be able to work without changes once the memcached protocol (http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt) has been implemented completely.
  Author:
    Bela Ban

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MemcachedConnector.Request`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemcachedConnector(java.net.InetAddress bind_addr, int port, PartitionedHashMap<java.lang.String,byte[]> cache)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.InetAddress` | `getBindAddress()`
    `PartitionedHashMap<java.lang.String,byte[]>` | `getCache()`
    `int` | `getPort()`
    `java.util.Map<java.lang.String,java.lang.Object>` | `getStats()`
    `java.util.concurrent.Executor` | `getThreadPool()`
    `int` | `getThreadPoolCoreThreads()`
    `long` | `getThreadPoolIdleTime()`
    `int` | `getThreadPoolMaxThreads()`
    `void` | `run()`
    `void` | `setBindAddress(java.net.InetAddress bind_addr)`
    `void` | `setCache(PartitionedHashMap<java.lang.String,byte[]> cache)`
    `void` | `setPort(int port)`
    `void` | `setThreadPool(java.util.concurrent.Executor thread_pool)`
    `void` | `setThreadPoolCoreThreads(int core_threads)`
    `void` | `setThreadPoolIdleTime(long idle_time)`
    `void` | `setThreadPoolMaxThreads(int max_threads)`
    `void` | `start()`
    `void` | `stop()`

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

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

- - ### Constructor Detail

    - #### MemcachedConnector

          public MemcachedConnector(java.net.InetAddress bind_addr,
                            int port,
                            PartitionedHashMap<java.lang.String,byte[]> cache)

  - ### Method Detail

    - #### getBindAddress

          public java.net.InetAddress getBindAddress()

    - #### setBindAddress

          public void setBindAddress(java.net.InetAddress bind_addr)

    - #### getPort

          public int getPort()

    - #### setPort

          public void setPort(int port)

    - #### getCache

          public PartitionedHashMap<java.lang.String,byte[]> getCache()

    - #### setCache

          public void setCache(PartitionedHashMap<java.lang.String,byte[]> cache)

    - #### getThreadPoolCoreThreads

          public int getThreadPoolCoreThreads()

    - #### setThreadPoolCoreThreads

          public void setThreadPoolCoreThreads(int core_threads)

    - #### getThreadPoolMaxThreads

          public int getThreadPoolMaxThreads()

    - #### setThreadPoolMaxThreads

          public void setThreadPoolMaxThreads(int max_threads)

    - #### getThreadPoolIdleTime

          public long getThreadPoolIdleTime()

    - #### setThreadPoolIdleTime

          public void setThreadPoolIdleTime(long idle_time)

    - #### getThreadPool

          public java.util.concurrent.Executor getThreadPool()

    - #### setThreadPool

          public void setThreadPool(java.util.concurrent.Executor thread_pool)

    - #### getStats

          public java.util.Map<java.lang.String,java.lang.Object> getStats()

    - #### start

          public void start()
                     throws java.io.IOException,
                            javax.management.MalformedObjectNameException,
                            javax.management.MBeanRegistrationException

      Throws:
        `java.io.IOException`
        `javax.management.MalformedObjectNameException`
        `javax.management.MBeanRegistrationException`

    - #### stop

          public void stop()
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.