@Service(name="payara-cluster-store") @RunLevel(value=10) public class ClusteredStore extends Object implements EventListener, MonitoringDataSource
EventListener.Event<T>| Constructor and Description |
|---|
ClusteredStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(MonitoringDataCollector collector)
Collects all the data points of this at the current moment.
|
boolean |
containsKey(String storeName,
Serializable key)
Checks to see if a a key already exists in Hazelcast.
|
void |
event(EventListener.Event event)
Process a Glassfish/Payara event
|
Serializable |
get(String storeName,
Serializable key)
Gets the value from Hazelcast with the specified key in the given store.
|
String |
getInstanceId() |
Map<Serializable,Serializable> |
getMap(String storeName)
Gets all the key/value pairs in a given Hazelcast store.
|
com.hazelcast.core.MultiMap<Serializable,Serializable> |
getMultiMap(String storeName)
Gets the requested MultiMap from Hazelcast.
|
boolean |
isEnabled()
Returns true if Hazelcast is enabled
|
void |
postConstruct() |
boolean |
remove(String storeName,
Serializable key)
Removes a key/value pair of a Hazelcast store.
|
boolean |
set(String storeName,
Serializable key,
Serializable value)
Stores a value in Hazelcast
|
@PostConstruct public void postConstruct()
public void collect(MonitoringDataCollector collector)
MonitoringDataSourcecollect in interface MonitoringDataSourcecollector - the MonitoringDataCollector instance to use to collect the data points of this sourcepublic String getInstanceId()
public boolean isEnabled()
public boolean set(String storeName, Serializable key, Serializable value)
storeName - The name of the store to put the value into.
This will be created if it does not already exist.key - value - public boolean remove(String storeName, Serializable key)
storeName - The name of the store to remove fromkey - The key to removepublic boolean containsKey(String storeName, Serializable key)
storeName - key - public Serializable get(String storeName, Serializable key)
storeName - key - public void event(EventListener.Event event)
EventListenerevent in interface EventListenerpublic Map<Serializable,Serializable> getMap(String storeName)
Part of MicroProfile Config
storeName - The store name to lookuppublic com.hazelcast.core.MultiMap<Serializable,Serializable> getMultiMap(String storeName)
storeName - The MultiMap to getCopyright © 2019. All rights reserved.