Class HazelcastPluginSharedDataStore
- java.lang.Object
-
- com.atlassian.confluence.cluster.hazelcast.shareddata.HazelcastPluginSharedDataStore
-
- All Implemented Interfaces:
PluginSharedDataStore
@Internal public class HazelcastPluginSharedDataStore extends Object implements PluginSharedDataStore
A Hazelcast-specific implementation ofPluginSharedDataStore. Use a combination of distributed collections to keep the shared data synchronized between cluster nodes, and to record which plugins are using which shared data.- Since:
- 5.7
-
-
Constructor Summary
Constructors Constructor Description HazelcastPluginSharedDataStore(com.hazelcast.core.HazelcastInstance hazelcastInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedDatagetPluginSharedData(PluginSharedDataKey sharedDataKey, com.atlassian.plugin.Plugin plugin)Obtain the stored SharedData instance for the given key and plugin informationvoidunregisterPluginSharedData(com.atlassian.plugin.Plugin plugin)When a plugin gets uninstalled from the current cluster node, try and clean up.
-
-
-
Method Detail
-
getPluginSharedData
public SharedData getPluginSharedData(PluginSharedDataKey sharedDataKey, com.atlassian.plugin.Plugin plugin)
Description copied from interface:PluginSharedDataStoreObtain the stored SharedData instance for the given key and plugin information- Specified by:
getPluginSharedDatain interfacePluginSharedDataStore
-
unregisterPluginSharedData
public void unregisterPluginSharedData(com.atlassian.plugin.Plugin plugin)
When a plugin gets uninstalled from the current cluster node, try and clean up. If other nodes are still using the shared data, then we don't do anything, but if this is the last cluster node to unregister, then we clear the shared data map to prevent a memory leak. Note that Hazelcast des not allow us to remove the actual shared map itself, so we have to settle for just removing its contents.- Specified by:
unregisterPluginSharedDatain interfacePluginSharedDataStore
-
-