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 intEXPECTED_CONFIG_LENstatic intEXPECTED_SYS_CONFIG_LENprotected ID_TYPEidstatic intID_TOKEN_POSITIONstatic intIID_TOKEN_POSITIONprotected InstanceIdinstanceIdstatic StringNAMESPACE_NODE_NAMEstatic StringTABLES_NODE_NAMEstatic intTYPE_TOKEN_POSITION
-
Constructor Summary
Constructors Modifier Constructor Description protectedPropStoreKey(InstanceId instanceId, String path, ID_TYPE id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(@NonNull PropStoreKey<ID_TYPE> other)booleanequals(Object o)static @Nullable PropStoreKey<?>fromPath(String path)Determine the prop cache id from a ZooKeeper path@NonNull ID_TYPEgetId()@NonNull StringgetPath()inthashCode()StringtoString()
-
-
-
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:
compareToin interfaceComparable<ID_TYPE extends AbstractId<ID_TYPE>>
-
-