public class ClusterRepositoryInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLUSTER_CONFIG_NODE |
static String |
CLUSTER_ID_PROP |
static String |
OAK_CLUSTERID_REPOSITORY_DESCRIPTOR_KEY |
| Modifier and Type | Method and Description |
|---|---|
static @Nullable String |
getOrCreateId(@NotNull NodeStore store)
Gets the {# CLUSTER_ID_PROP} if available, if it doesn't it
creates it and returns the newly created one (or if that
happened concurrently and another cluster instance won,
return that one)
Note that this method doesn't require synchronization as
concurrent execution within the VM would be covered
within NodeStore's merge and result in a conflict for
one of the two threads - in which case the looser would
re-read and find the clusterId set.
|
public static final String OAK_CLUSTERID_REPOSITORY_DESCRIPTOR_KEY
public static final String CLUSTER_CONFIG_NODE
public static final String CLUSTER_ID_PROP
@Nullable public static @Nullable String getOrCreateId(@NotNull @NotNull NodeStore store)
Note that this method doesn't require synchronization as concurrent execution within the VM would be covered within NodeStore's merge and result in a conflict for one of the two threads - in which case the looser would re-read and find the clusterId set.
store - the NodeStore instanceCopyright © 2012–2020 The Apache Software Foundation. All rights reserved.