Package akka.cluster.ddata
Class Key<T extends ReplicatedData>
- java.lang.Object
-
- akka.cluster.ddata.Key<T>
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FlagKey
,GCounterKey
,GSetKey
,Key.UnspecificKey
,LWWMapKey
,LWWRegisterKey
,ORMapKey
,ORMultiMapKey
,ORSetKey
,PNCounterKey
,PNCounterMapKey
public abstract class Key<T extends ReplicatedData> extends java.lang.Object implements java.io.Serializable
Key for the key-value data inReplicator
. The type of the data value is defined in the key. Keys are compared equal if theid
strings are equal, i.e. use unique identifiers.Specific classes are provided for the built in data types, e.g.
ORSetKey
, and you can create your own keys.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Key.UnspecificKey
static class
Key.UnspecificKey$
-
Constructor Summary
Constructors Constructor Description Key(java.lang.String id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
id()
java.lang.String
toString()
static scala.Option<java.lang.String>
unapply(Key<?> k)
Extract theid()
.Key<ReplicatedData>
withId(java.lang.String newId)
-
-
-
Method Detail
-
id
public java.lang.String id()
-
withId
public Key<ReplicatedData> withId(java.lang.String newId)
-
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-