java.lang.Object
me.ahoo.cosid.store.StoreKeys
The keys every backend stores alike (R1-spi-02, 06-stores.md ยง1): namespaces, the names of generators and machines,
and the range and owner keys made from them. A key that one backend cannot store fails at start-up on every backend,
so a configuration moves between backends unchanged.
- A namespace: 1 to 100 of
A-Z a-z 0-9 . _ : -, starting with a letter or digit (the JDBCnamespacecolumn; a ZooKeeper node name; a Redis hash tag). - A name: not empty, without
/, not.nor.., without whitespace (SQL Server ignores trailing spaces when it compares; cosid-server refuses blanks in a range key), and without a character ZooKeeper refuses in a path: controls, surrogates,U+E000..U+F8FFandU+FFF0..U+FFFF. - A range key (
namespace/name,namespace/name/period) and an owner key: at most 255 UTF-16 units (the JDBCvarchar(255)/nvarchar(255)columns), without leading or trailing whitespace nor a character ZooKeeper refuses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe longest range key or owner key.static final intThe longest namespace. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNamespace(String namespace) Whether every backend stores this namespace.keyProblem(String what, String key) Why a range key or owner key is not portable.nameProblem(String name) Why a generator or machine name is not portable.namespaceProblem(String namespace) Why a namespace is not portable.
-
Field Details
-
MAX_NAMESPACE_LENGTH
public static final int MAX_NAMESPACE_LENGTHThe longest namespace.- See Also:
-
MAX_KEY_LENGTH
public static final int MAX_KEY_LENGTHThe longest range key or owner key.- See Also:
-
-
Method Details
-
isNamespace
Whether every backend stores this namespace.- Parameters:
namespace- the namespace- Returns:
- true if it is portable
-
namespaceProblem
Why a namespace is not portable.- Parameters:
namespace- the namespace- Returns:
- the problem; empty when it is portable
-
nameProblem
Why a generator or machine name is not portable.- Parameters:
name- the name- Returns:
- the problem; empty when it is portable
-
keyProblem
Why a range key or owner key is not portable.- Parameters:
what- the kind of key, for the problemkey- the key- Returns:
- the problem; empty when it is portable
-