|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.saga.repository.AssociationValueMap
public class AssociationValueMap
In-memory storage for AssociationValue to Saga mappings. A single AssociationValue can map to several Sagas, and a single Saga can be mapped by several AssociationValues.
Note that this "map" does not implement the Map interface. This is mainly due to the specific nature and intent of this implementation. For example, the Map interface does not allow a single key to point to more than one value. This implementation is thread safe and has an expected average time cost oflog(n)
.
Constructor Summary | |
---|---|
AssociationValueMap()
Initializes a new and empty AssociationValueMap. |
Method Summary | |
---|---|
void |
add(AssociationValue associationValue,
String sagaType,
String sagaIdentifier)
Adds an association between the given associationValue and sagaIdentifier . |
void |
clear()
Clears all the associations. |
Set<String> |
findSagas(String sagaType,
AssociationValue associationValue)
Returns the identifiers of the Sagas that have been associated with the given associationValue . |
boolean |
isEmpty()
Indicates whether any elements are contained within this map. |
void |
remove(AssociationValue associationValue,
String sagaType,
String sagaIdentifier)
Removes an association between the given associationValue and sagaIdentifier . |
int |
size()
Returns an approximation of the size of this map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssociationValueMap()
Method Detail |
---|
public Set<String> findSagas(String sagaType, AssociationValue associationValue)
associationValue
.
sagaType
- The type of the associated SagaassociationValue
- The associationValue to find Sagas for
public void add(AssociationValue associationValue, String sagaType, String sagaIdentifier)
associationValue
and sagaIdentifier
.
associationValue
- The association value associated with the SagasagaType
- The type of the associated SagasagaIdentifier
- The identifier of the associated Sagapublic void remove(AssociationValue associationValue, String sagaType, String sagaIdentifier)
associationValue
and sagaIdentifier
.
associationValue
- The association value associated with the SagasagaType
- The type of the associated SagasagaIdentifier
- The identifier of the associated Sagapublic void clear()
public boolean isEmpty()
true
if this Map is empty, false
if it contains any associations.public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |