public interface ExternalCallDao
ExternalCall
entity.Modifier and Type | Method and Description |
---|---|
ExternalCall |
findConfirmation(Duration interval)
Finds ONE confirmation in state
ExternalCallStateEnum.FAILED . |
List<ExternalCall> |
findProcessingExternalCalls(Duration interval)
Finds "processing" external calls in specified interval.
|
ExternalCall |
getExternalCall(String operationName,
String entityId)
Finds an existing external call for the specified operation and entityId.
|
void |
insert(ExternalCall externalCall)
Inserts new call.
|
ExternalCall |
lockConfirmation(ExternalCall extCall)
Updates confirmation (set state to PROCESSING) - gets lock for this confirmation.
|
void |
lockExternalCall(ExternalCall extCall)
Updates the specified attached external call entity to
start processing a new external call (set state to PROCESSING).
|
void |
update(ExternalCall externalCall)
Updates call.
|
void insert(ExternalCall externalCall)
externalCall
- the external callvoid update(ExternalCall externalCall)
externalCall
- the external call@Nullable ExternalCall getExternalCall(String operationName, String entityId)
operationName
- the operation name (uri) to find the call forentityId
- the entity id (operation key) to find the call forvoid lockExternalCall(ExternalCall extCall) throws javax.persistence.PersistenceException
extCall
- the external call that is attached to local EntityManager
(e.g., acquired via getExternalCall(String, String)
in the same transaction)javax.persistence.PersistenceException
- e.g., if the lock fails@Nullable ExternalCall findConfirmation(Duration interval)
ExternalCallStateEnum.FAILED
.interval
- Interval (in seconds) between two tries of failed confirmations.null
if there is no any confirmationExternalCall lockConfirmation(ExternalCall extCall)
extCall
- the external calljavax.persistence.PersistenceException
- e.g., if the lock failsList<ExternalCall> findProcessingExternalCalls(Duration interval)
interval
- the intervalCopyright © 2018 Pivotal Software, Inc.. All rights reserved.