MCPcopy
hub / github.com/OpenTSDB/opentsdb / UniqueIdInterface

Interface UniqueIdInterface

src/uid/UniqueIdInterface.java:39–93  ·  view source on GitHub ↗

Represents a table of Unique IDs, manages the lookup and creation of IDs. This interface is useless and deprecated. It provides no benefits and will be removed eventually. No new methods are added to this interface. Simply replace all uses of this interface with {@link Unique

Source from the content-addressed store, hash-verified

37 * implementation dependent.
38 */
39@Deprecated
40public interface UniqueIdInterface {
41
42 /**
43 * Returns what kind of Unique ID is served by this instance.
44 */
45 String kind();
46
47 /**
48 * Returns the number of bytes on which each Unique ID is encoded.
49 */
50 short width();
51
52 /**
53 * Finds the name associated with a given ID.
54 *
55 * @param id The ID associated with that name.
56 * @see #getId(String)
57 * @see #getOrCreateId(String)
58 * @throws NoSuchUniqueId if the given ID is not assigned.
59 * @throws HBaseException if there is a problem communicating with HBase.
60 * @throws IllegalArgumentException if the ID given in argument is encoded
61 * on the wrong number of bytes.
62 */
63 String getName(byte[] id) throws NoSuchUniqueId, HBaseException;
64
65 /**
66 * Finds the ID associated with a given name.
67 * <p>
68 * The length of the byte array is fixed in advance by the implementation.
69 *
70 * @param name The name to lookup in the table.
71 * @see #getName(byte[])
72 * @return A non-null, non-empty {@code byte[]} array.
73 * @throws NoSuchUniqueName if the name requested doesn't have an ID assigned.
74 * @throws HBaseException if there is a problem communicating with HBase.
75 * @throws IllegalStateException if the ID found in HBase is encoded on the
76 * wrong number of bytes.
77 */
78 byte[] getId(String name) throws NoSuchUniqueName, HBaseException;
79
80 /**
81 * Finds the ID associated with a given name or creates it.
82 * <p>
83 * The length of the byte array is fixed in advance by the implementation.
84 *
85 * @param name The name to lookup in the table or to assign an ID to.
86 * @throws HBaseException if there is a problem communicating with HBase.
87 * @throws IllegalStateException if all possible IDs are already assigned.
88 * @throws IllegalStateException if the ID found in HBase is encoded on the
89 * wrong number of bytes.
90 */
91 byte[] getOrCreateId(String name) throws HBaseException, IllegalStateException;
92
93}

Callers 32

kindEqualMethod · 0.65
callMethod · 0.65
callMethod · 0.65
callMethod · 0.65
allocateUidMethod · 0.65
createReverseMappingMethod · 0.65
createForwardMappingMethod · 0.65
doneMethod · 0.65
beforeMethod · 0.65
beforeMethod · 0.65
beforeMethod · 0.65
beforeMethod · 0.65

Implementers 1

UniqueIdsrc/uid/UniqueId.java

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…