public class HazelcastService extends Object implements DbService
short-lived map
-- evictions based on
TTL
. Used for things such as storing
stateModifier 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 , LostAuctionTask s, 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
Lot49Exception
public HazelcastService(ServiceRunner runner, HazelcastServiceConfig config, boolean noInit) throws Lot49Exception
Lot49Exception
public static final void incrBytesWritten(long l)
public static final long resetBytesWritten()
public void makeHazelConfig(Orchestrator orch) throws Lot49Exception
Lot49Exception
private 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
, LostAuctionTask
s, etc.) without any need for backing store.public long getNextId()
public void init(DbConfig config) throws Lot49Exception
init
in interface DbService
Lot49Exception
public <T> DaoShortLivedMap<T> getDaoShortLivedMap(Class<T> type)
getDaoShortLivedMap
in interface DbService
public <T> DaoShortLivedMap<T> getDaoShortLivedMap()
getDaoShortLivedMap
in interface DbService
public <T> DaoCacheLoader<T> getDaoCacheLoader()
getDaoCacheLoader
in interface DbService
public <T> DaoCache<T> getDaoCache(DaoCacheLoader<T> loader, T nullValue, long ttl, long maxItems)
getDaoCache
in interface DbService
public DaoCounters getDaoCounters()
getDaoCounters
in interface DbService
public DaoMapOfUserAttributes getDaoMapOfUserAttributes()
getDaoMapOfUserAttributes
in interface DbService
public DaoMapOfUserSegments getDaoMapOfUserSegments()
getDaoMapOfUserSegments
in interface DbService