public class SagaEntry<T> extends Object
| Constructor and Description | 
|---|
SagaEntry(org.bson.Document dbSaga)
Initializes a Saga entry using a DBObject containing the Mongo Document 
 | 
SagaEntry(String identifier,
         T saga,
         Set<AssociationValue> associationValues,
         Serializer serializer)
Constructs a new SagaEntry for the given  
saga. | 
| Modifier and Type | Method and Description | 
|---|---|
org.bson.Document | 
asDocument()
Returns the Mongo Document representing the Saga provided in this entry. 
 | 
Set<AssociationValue> | 
getAssociationValues()
Get a set of all the Saga's associations. 
 | 
T | 
getSaga(Serializer serializer)
Returns the Saga instance stored in this entry. 
 | 
String | 
getSagaId()
Get the identifier of this Saga. 
 | 
static org.bson.conversions.Bson | 
queryByIdentifier(String identifier)
Returns the Mongo Query to find a Saga based on its identifier. 
 | 
public SagaEntry(String identifier, T saga, Set<AssociationValue> associationValues, Serializer serializer)
saga. The given saga must be serializable. The provided
 saga is not modified by this operation.identifier - The identifier of the sagasaga - The saga to storeassociationValues - The associations of the sagaserializer - The serialization mechanism to convert the Saga to a byte streampublic SagaEntry(org.bson.Document dbSaga)
dbSaga - The mongo Document containing the serialized sagapublic T getSaga(Serializer serializer)
serializer - The serializer to decode the Sagapublic String getSagaId()
public Set<AssociationValue> getAssociationValues()
public org.bson.Document asDocument()
public static org.bson.conversions.Bson queryByIdentifier(String identifier)
identifier - The identifier of the saga to findCopyright © 2010–2018. All rights reserved.