public class SimpleCacheService extends Object
A simple cache service implementation based on concurrent hash map
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
int |
decr(String key) |
int |
decr(String key,
int ttl) |
void |
evict(String key) |
<T> T |
get(String key) |
int |
incr(String key) |
int |
incr(String key,
int ttl) |
void |
put(String key,
Object value) |
void |
put(String key,
Object value,
int ttl) |
void |
setDefaultTTL(int ttl) |
void |
shutdown() |
void |
startup() |
public void evict(String key)
public void clear()
public <T> T get(String key)
public void setDefaultTTL(int ttl)
public void shutdown()
public void startup()
public int incr(String key)
incr in interface org.osgl.cache.CacheServicepublic int incr(String key, int ttl)
incr in interface org.osgl.cache.CacheServicepublic int decr(String key)
decr in interface org.osgl.cache.CacheServicepublic int decr(String key, int ttl)
decr in interface org.osgl.cache.CacheServiceCopyright © 2017 OSGL (Open Source General Library). All rights reserved.