Class ChangeSet<T>

java.lang.Object
com.launchdarkly.sdk.fdv2.ChangeSet<T>
Type Parameters:
T - the type of the data payload

public final class ChangeSet<T> extends Object
Represents a set of changes to apply to a data store.
  • 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.EMPTY for the selector parameter. Non-empty selectors are only meaningful for LaunchDarkly's own data sources.

      Parameters:
      type - the type of the changeset
      selector - the selector for this change; null is normalized to Selector.EMPTY
      data - the data payload
      environmentId - the environment ID, or null if not available
      shouldPersist - true if the data should be persisted to persistent stores
  • Method Details

    • getType

      public ChangeSetType getType()
      Returns the type of the changeset.
      Returns:
      the changeset type
    • getSelector

      public Selector getSelector()
      Returns the selector for this change. Will not be null; may be Selector.EMPTY.
      Returns:
      the selector
    • getEnvironmentId

      public String getEnvironmentId()
      Returns the environment ID associated with the change, or null if not available.
      Returns:
      the environment ID, or null
    • getData

      public T 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object