Package org.jgroups.blocks
Class MemcachedConnector
java.lang.Object
org.jgroups.blocks.MemcachedConnector
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsConstructorDescriptionMemcachedConnector(InetAddress bind_addr, int port, PartitionedHashMap<String, byte[]> cache) -
Method Summary
Modifier and TypeMethodDescriptionPartitionedHashMap<String, byte[]> getCache()intgetPort()getStats()intlongintvoidrun()voidsetBindAddress(InetAddress bind_addr) voidsetCache(PartitionedHashMap<String, byte[]> cache) voidsetPort(int port) voidsetThreadPool(Executor thread_pool) voidsetThreadPoolCoreThreads(int core_threads) voidsetThreadPoolIdleTime(long idle_time) voidsetThreadPoolMaxThreads(int max_threads) voidstart()voidstop()
-
Constructor Details
-
MemcachedConnector
-
-
Method Details
-
getBindAddress
-
setBindAddress
-
getPort
public int getPort() -
setPort
public void setPort(int port) -
getCache
-
setCache
-
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
-
setThreadPool
-
getStats
-
start
-
stop
- Throws:
IOException
-
run
public void run()
-