T
- the item typepublic abstract class VersionedDataKind<T extends VersionedData>
extends java.lang.Object
VersionedData
objects that may exist in a FeatureStore
.
You will not need to refer to this type unless you are directly manipulating a FeatureStore
or writing your own FeatureStore
implementation. If you are implementing a custom store, for
maximum forward compatibility you should only refer to VersionedData
, VersionedDataKind
,
and ALL
, and avoid any dependencies on specific type descriptor instances
or any specific fields of the types they describe.Modifier and Type | Field and Description |
---|---|
static java.lang.Iterable<VersionedDataKind<?>> |
ALL
A list of all existing instances of
VersionedDataKind . |
static VersionedDataKind<com.launchdarkly.client.FeatureFlag> |
FEATURES
The
VersionedDataKind instance that describes feature flag data. |
static VersionedDataKind<com.launchdarkly.client.Segment> |
SEGMENTS
The
VersionedDataKind instance that describes user segment data. |
Constructor and Description |
---|
VersionedDataKind() |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<java.lang.String> |
getDependencyKeys(VersionedData item)
Gets all keys of items that this one directly depends on, if this kind of item can have
dependencies.
|
abstract java.lang.Class<T> |
getItemClass()
The Java class for objects of this type.
|
abstract java.lang.String |
getNamespace()
A short string that serves as the unique name for the collection of these objects, e.g.
|
int |
getPriority()
Used internally to determine the order in which collections are updated.
|
abstract java.lang.String |
getStreamApiPath()
The path prefix for objects of this type in events received from the streaming API.
|
boolean |
isDependencyOrdered()
Returns true if the SDK needs to store items of this kind in an order that is based on
getDependencyKeys(VersionedData) . |
abstract T |
makeDeletedItem(java.lang.String key,
int version)
Return an instance of this type with the specified key and version, and deleted=true.
|
java.lang.String |
toString() |
public static VersionedDataKind<com.launchdarkly.client.FeatureFlag> FEATURES
VersionedDataKind
instance that describes feature flag data.public static VersionedDataKind<com.launchdarkly.client.Segment> SEGMENTS
VersionedDataKind
instance that describes user segment data.public static java.lang.Iterable<VersionedDataKind<?>> ALL
VersionedDataKind
.public abstract java.lang.String getNamespace()
public abstract java.lang.Class<T> getItemClass()
public abstract java.lang.String getStreamApiPath()
public abstract T makeDeletedItem(java.lang.String key, int version)
key
- the unique keyversion
- the version numberpublic int getPriority()
public boolean isDependencyOrdered()
getDependencyKeys(VersionedData)
.public java.lang.Iterable<java.lang.String> getDependencyKeys(VersionedData item)
Note that this does not use the generic type T, because it is called from code that only knows about VersionedData, so it will need to do a type cast. However, it can rely on the item being of the correct class.
item
- the itempublic java.lang.String toString()
toString
in class java.lang.Object