TAdd - Type of values to be used for creating/adding new valuesTUpdate - Type of values to be used for updating existing values
public class SnapshotDelta<TAdd,TUpdate>
extends java.lang.Object
implements java.io.Serializable
The types of values whose delta is represented depends on the initial snapshots. For example, a delta of two snapshots of references (e.g., Snapshot<Ref> will yield SnapshotDelta<Ref,Ref>.
Given two snapshots, S1, and S2, the delta between S1 and S2 contains the following:
Snapshot, ApplySnapshotDeltaTask, Snapshots, Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<Ref,TAdd> |
addedResources |
protected java.util.Set<Ref> |
deletedResources |
protected java.util.Map<Ref,TUpdate> |
updatedResources |
protected RefValueDomain |
valueDomain |
| Constructor and Description |
|---|
SnapshotDelta(RefValueDomain valueDomain, java.util.Map<Ref,TAdd> addedResources, java.util.Map<Ref,TUpdate> updatedResources, java.util.Set<Ref> deletedResources)
Constructor
|
SnapshotDelta(RefValueDomain valueDomain, SnapshotDelta<TAdd,TUpdate> other) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<Ref,TAdd> |
getAddedResources()
Assuming the delta is computed between snapshots S1, and S2, returns values that needs to be added to S1 (e.g., those that exist in S2 but not in S1)
|
java.util.Set<Ref> |
getDeletedResources()
Assuming the delta is computed between snapshots S1, and S2, returns resources that needs to be deleted from S1 (e.g., exist in S1, but not in S2)
|
java.util.Map<Ref,TUpdate> |
getUpdatedResources()
Assuming the delta is computed between snapshots S1, and S2, returns delta values that S1 needs to be updated with.
|
RefValueDomain |
getValueDomain()
Returns the value domain that this delta applies to
|
java.lang.String |
toString() |
protected final RefValueDomain valueDomain
protected final java.util.Set<Ref> deletedResources
public SnapshotDelta(RefValueDomain valueDomain, java.util.Map<Ref,TAdd> addedResources, java.util.Map<Ref,TUpdate> updatedResources, java.util.Set<Ref> deletedResources)
valueDomain - the domain of references represented by this deltaaddedResources - resources and relevant values to be addedupdatedResources -deletedResources -public SnapshotDelta(RefValueDomain valueDomain, SnapshotDelta<TAdd,TUpdate> other)
public RefValueDomain getValueDomain()
public java.util.Map<Ref,TAdd> getAddedResources()
public java.util.Map<Ref,TUpdate> getUpdatedResources()
public java.util.Set<Ref> getDeletedResources()
public java.lang.String toString()
toString in class java.lang.Object