Interface IOriginRetentionPolicy
- All Known Implementing Classes:
AbstractOriginRetentionPolicy,CompleteOriginRetentionPolicy,NoOriginRetentionPolicy,SpecificOriginRetentionPolicy
public interface IOriginRetentionPolicy
Origin retention policies control the way in which origins for graph elements are kept. Using such
policies, graph consumers may specify precisely which origin data needs to be kept and avoid wasting
resources for storing unneccessary data.
- Since:
- 1.6
-
Method Summary
Modifier and Type Method Description booleandependsOn(IOriginRetentionPolicy policy)Checks whether this origin retention policy depends on the given policy.OriginRetentionPolicyKindgetKind()Returns the kind of this retention policy.<T> voidhandleOrigin(AbstractGraphElement<T> element, T origin)Handles a given origin for the given graph element.booleanisCompatibleWith(IOriginRetentionPolicy other)Checks whether this policy is compatible (i.e.IOriginRetentionPolicyuniteWith(IOriginRetentionPolicy other)Unites this retention policy with another one and returns the resulting policy.
-
Method Details
-
getKind
OriginRetentionPolicyKind getKind()Returns the kind of this retention policy.- Returns:
- See above
- Since:
- 1.6
-
isCompatibleWith
Checks whether this policy is compatible (i.e. unitable) with another retention policy.- Parameters:
other- The retention policy to check against- Returns:
Trueif the policies may be united,falseotherwise- Since:
- 1.6
-
dependsOn
Checks whether this origin retention policy depends on the given policy.- Parameters:
policy- The policy to check for dependencies- Returns:
Trueif the policy depends on the given policy,falseotherwise- Since:
- 1.6
-
uniteWith
Unites this retention policy with another one and returns the resulting policy. Note that the resulting policy is not necessarily one of the original policies.- Parameters:
other- The retention policy to unite this policy with- Returns:
- The resulting policy, which may be a completely new object
- Since:
- 1.6
-
handleOrigin
Handles a given origin for the given graph element.- Type Parameters:
T- The type of the entity within the graph element.- Parameters:
element- The graph element to handle the origin fororigin- The origin to handle- Since:
- 1.6
-