Package com.launchdarkly.sdk.fdv2
Class ChangeSet<T>
java.lang.Object
com.launchdarkly.sdk.fdv2.ChangeSet<T>
- Type Parameters:
T- the type of the data payload
Represents a set of changes to apply to a data store.
-
Constructor Summary
ConstructorsConstructorDescriptionChangeSet(ChangeSetType type, Selector selector, T data, String environmentId, boolean shouldPersist) Constructs a new ChangeSet. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetData()Returns the data payload for this changeset.Returns the environment ID associated with the change, or null if not available.Returns the selector for this change.getType()Returns the type of the changeset.inthashCode()booleanReturns whether this data should be persisted to persistent stores.toString()
-
Constructor Details
-
ChangeSet
public ChangeSet(ChangeSetType type, Selector selector, T data, String environmentId, boolean shouldPersist) Constructs a new ChangeSet.When implementing a custom data source, pass
Selector.EMPTYfor theselectorparameter. Non-empty selectors are only meaningful for LaunchDarkly's own data sources.- Parameters:
type- the type of the changesetselector- the selector for this change; null is normalized toSelector.EMPTYdata- the data payloadenvironmentId- the environment ID, or null if not availableshouldPersist- true if the data should be persisted to persistent stores
-
-
Method Details
-
getType
Returns the type of the changeset.- Returns:
- the changeset type
-
getSelector
Returns the selector for this change. Will not be null; may beSelector.EMPTY.- Returns:
- the selector
-
getEnvironmentId
Returns the environment ID associated with the change, or null if not available.- Returns:
- the environment ID, or null
-
getData
Returns the data payload for this changeset.- Returns:
- the data
-
shouldPersist
public boolean shouldPersist()Returns whether this data should be persisted to persistent stores.- Returns:
- true if the data should be persisted, false otherwise
-
equals
-
hashCode
public int hashCode() -
toString
-