Class PropStoreKey<ID_TYPE extends AbstractId<ID_TYPE>>
- java.lang.Object
-
- org.apache.accumulo.server.conf.store.PropStoreKey<ID_TYPE>
-
- All Implemented Interfaces:
Comparable<PropStoreKey<ID_TYPE>>
- Direct Known Subclasses:
NamespacePropKey
,SystemPropKey
,TablePropKey
public abstract class PropStoreKey<ID_TYPE extends AbstractId<ID_TYPE>> extends Object implements Comparable<PropStoreKey<ID_TYPE>>
Provides a strongly-typed id for storing properties in ZooKeeper. The path in ZooKeeper is determined by the instance id and the type (system, namespace and table), with different root paths.Provides utility methods from constructing different id based on type and methods to parse a ZooKeeper path and return a prop cache id.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EXPECTED_CONFIG_LEN
static int
EXPECTED_SYS_CONFIG_LEN
protected ID_TYPE
id
static int
ID_TOKEN_POSITION
static int
IID_TOKEN_POSITION
protected InstanceId
instanceId
static String
NAMESPACE_NODE_NAME
static String
TABLES_NODE_NAME
static int
TYPE_TOKEN_POSITION
-
Constructor Summary
Constructors Modifier Constructor Description protected
PropStoreKey(InstanceId instanceId, String path, ID_TYPE id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(@NonNull PropStoreKey<ID_TYPE> other)
boolean
equals(Object o)
static @Nullable PropStoreKey<?>
fromPath(String path)
Determine the prop cache id from a ZooKeeper path@NonNull ID_TYPE
getId()
@NonNull String
getPath()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
TYPE_TOKEN_POSITION
public static final int TYPE_TOKEN_POSITION
- See Also:
- Constant Field Values
-
IID_TOKEN_POSITION
public static final int IID_TOKEN_POSITION
- See Also:
- Constant Field Values
-
ID_TOKEN_POSITION
public static final int ID_TOKEN_POSITION
- See Also:
- Constant Field Values
-
TABLES_NODE_NAME
public static final String TABLES_NODE_NAME
-
NAMESPACE_NODE_NAME
public static final String NAMESPACE_NODE_NAME
-
EXPECTED_CONFIG_LEN
public static final int EXPECTED_CONFIG_LEN
- See Also:
- Constant Field Values
-
EXPECTED_SYS_CONFIG_LEN
public static final int EXPECTED_SYS_CONFIG_LEN
- See Also:
- Constant Field Values
-
instanceId
protected final InstanceId instanceId
-
id
protected final ID_TYPE extends AbstractId<ID_TYPE> id
-
-
Constructor Detail
-
PropStoreKey
protected PropStoreKey(InstanceId instanceId, String path, ID_TYPE id)
-
-
Method Detail
-
getPath
public @NonNull String getPath()
-
getId
public @NonNull ID_TYPE getId()
-
fromPath
public static @Nullable PropStoreKey<?> fromPath(String path)
Determine the prop cache id from a ZooKeeper path- Parameters:
path
- the path- Returns:
- the prop cache id
-
compareTo
public int compareTo(@NonNull PropStoreKey<ID_TYPE> other)
- Specified by:
compareTo
in interfaceComparable<ID_TYPE extends AbstractId<ID_TYPE>>
-
-