|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.connector.federation.merge.MergePlan
@ThreadSafe public abstract class MergePlan
This class represents the details about how information from different sources are merged into a single federated node.
A merge plan basically consists of the individual contribution from each source and the information about how these contributions were merged into the single federated node.
Merge plans are designed to be serializable
, as they are persisted on the federated node and deserialized
to assist in the management of the federated node.
Method Summary | |
---|---|
static MergePlan |
addContribution(MergePlan plan,
Contribution contribution)
|
static MergePlan |
create(Collection<Contribution> contributions)
|
static MergePlan |
create(Contribution... contributions)
|
boolean |
equals(Object obj)
|
Property |
getAnnotation(Name name)
Get the plan annotation property with the given name. |
int |
getAnnotationCount()
Get the number of annotations. |
Set<Name> |
getAnnotationNames()
Get the set of annotation names . |
Map<Name,Property> |
getAnnotations()
Get a copy of the annotations. |
abstract int |
getContributionCount()
|
abstract Contribution |
getContributionFrom(String sourceName)
Get the contribution from the source with the supplied name. |
DateTime |
getExpirationTimeInUtc()
Get the expiration time (in UTC) that is the earliest time that any of the contributions Contribution.getExpirationTimeInUtc() . |
int |
getRealContributionCount()
Get the number of contributions that are not placeholders or empty. |
boolean |
isExpired(DateTime utcTime)
Determine whether this merge plan has expired given the supplied current time. |
abstract boolean |
isSource(String sourceName)
Return whether the named source was consulted for a contribution. |
Property |
setAnnotation(Property annotation)
Set the plan annotation property. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
public static MergePlan create(Contribution... contributions)
public static MergePlan create(Collection<Contribution> contributions)
public static MergePlan addContribution(MergePlan plan, Contribution contribution)
public boolean isExpired(DateTime utcTime)
expiration time
is the earliest time that any of the contributions
Contribution.getExpirationTimeInUtc()
.
utcTime
- the current time expressed in UTC; may not be null
public DateTime getExpirationTimeInUtc()
contributions
Contribution.getExpirationTimeInUtc()
.
public abstract Contribution getContributionFrom(String sourceName)
sourceName
- the name of the source
public abstract boolean isSource(String sourceName)
sourceName
- the name of the source
contribution
(even if it is an EmptyContribution
)public abstract int getContributionCount()
public int getRealContributionCount()
public Property getAnnotation(Name name)
name
- the name of the annotation
setAnnotation(Property)
public Property setAnnotation(Property annotation)
annotation
- the new annotation
getAnnotation(Name)
public int getAnnotationCount()
public Set<Name> getAnnotationNames()
names
.
public Map<Name,Property> getAnnotations()
public String toString()
toString
in class Object
Object.toString()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |