public class HazelcastService extends Object implements DbService
short-lived map -- evictions based on
TTL. Used for things such as storing
state| Modifier and Type | Field and Description |
|---|---|
private static AtomicLong |
BYTES_WRITTEN |
private HazelcastServiceConfig |
config |
private com.hazelcast.core.HazelcastInstance |
hazelcastInstance |
private com.hazelcast.client.config.ClientConfig |
hazelClientConfig |
private com.hazelcast.config.Config |
hazelConfig |
static String |
ID |
private com.hazelcast.core.IdGenerator |
idGenerator |
static String |
MAP_NAME_LONG_LIVED |
static String |
MAP_NAME_SHORT_LIVED |
private com.hazelcast.core.IMap<Object,Object> |
shortLivedMap |
private Map<Class<?>,DaoShortLivedMap<? extends Object>> |
slMapOfMaps |
| Constructor and Description |
|---|
HazelcastService(ServiceRunner runner,
HazelcastServiceConfig config) |
HazelcastService(ServiceRunner runner,
HazelcastServiceConfig config,
boolean noInit) |
| Modifier and Type | Method and Description |
|---|---|
HazelcastServiceConfig |
getConfig() |
<T> DaoCache<T> |
getDaoCache(DaoCacheLoader<T> loader,
T nullValue,
long ttl,
long maxItems) |
<T> DaoCacheLoader<T> |
getDaoCacheLoader() |
DaoCounters |
getDaoCounters() |
DaoMapOfUserAttributes |
getDaoMapOfUserAttributes() |
DaoMapOfUserSegments |
getDaoMapOfUserSegments() |
<T> DaoShortLivedMap<T> |
getDaoShortLivedMap() |
<T> DaoShortLivedMap<T> |
getDaoShortLivedMap(Class<T> type) |
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance() |
long |
getNextId() |
com.hazelcast.core.IMap<Object,Object> |
getShortLivedMap()
For persisting items short term, e.g.,
NUrl contents, LostAuctionTasks, etc.) without any need for backing store. |
static void |
incrBytesWritten(long l) |
void |
init(DbConfig config) |
void |
makeHazelConfig(Orchestrator orch) |
private com.hazelcast.config.MapConfig |
makeLongLivedMapConfig(String name) |
static long |
resetBytesWritten() |
private final com.hazelcast.core.IdGenerator idGenerator
private final HazelcastServiceConfig config
private static final AtomicLong BYTES_WRITTEN
private com.hazelcast.config.Config hazelConfig
private com.hazelcast.client.config.ClientConfig hazelClientConfig
public static final String ID
public static final String MAP_NAME_LONG_LIVED
public static final String MAP_NAME_SHORT_LIVED
private final com.hazelcast.core.HazelcastInstance hazelcastInstance
private final Map<Class<?>,DaoShortLivedMap<? extends Object>> slMapOfMaps
public HazelcastService(ServiceRunner runner, HazelcastServiceConfig config) throws Lot49Exception
Lot49Exceptionpublic HazelcastService(ServiceRunner runner, HazelcastServiceConfig config, boolean noInit) throws Lot49Exception
Lot49Exceptionpublic static final void incrBytesWritten(long l)
public static final long resetBytesWritten()
public void makeHazelConfig(Orchestrator orch) throws Lot49Exception
Lot49Exceptionprivate com.hazelcast.config.MapConfig makeLongLivedMapConfig(String name)
public HazelcastServiceConfig getConfig()
public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
public com.hazelcast.core.IMap<Object,Object> getShortLivedMap()
NUrl contents, LostAuctionTasks, etc.) without any need for backing store.public long getNextId()
public void init(DbConfig config) throws Lot49Exception
init in interface DbServiceLot49Exceptionpublic <T> DaoShortLivedMap<T> getDaoShortLivedMap(Class<T> type)
getDaoShortLivedMap in interface DbServicepublic <T> DaoShortLivedMap<T> getDaoShortLivedMap()
getDaoShortLivedMap in interface DbServicepublic <T> DaoCacheLoader<T> getDaoCacheLoader()
getDaoCacheLoader in interface DbServicepublic <T> DaoCache<T> getDaoCache(DaoCacheLoader<T> loader, T nullValue, long ttl, long maxItems)
getDaoCache in interface DbServicepublic DaoCounters getDaoCounters()
getDaoCounters in interface DbServicepublic DaoMapOfUserAttributes getDaoMapOfUserAttributes()
getDaoMapOfUserAttributes in interface DbServicepublic DaoMapOfUserSegments getDaoMapOfUserSegments()
getDaoMapOfUserSegments in interface DbService