@Service(name="payara-cluster-store") @RunLevel(value=10) public class ClusteredStore extends Object implements EventListener
EventListener.Event<T>| Constructor and Description |
|---|
ClusteredStore() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
Map<Serializable,Serializable> |
getMap(String storeName)
Gets all the key/value pairs in a given Hazelcast store.
|
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 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 lookupCopyright © 2017. All rights reserved.