Class AbstractIdempotentRepository
java.lang.Object
com.trendyol.jdempotent.core.datasource.AbstractIdempotentRepository
- All Implemented Interfaces:
IdempotentRepository
- Direct Known Subclasses:
InMemoryIdempotentRepository
public abstract class AbstractIdempotentRepository extends Object implements IdempotentRepository
Includes all the methods of IdempotentRequestStore
-
Constructor Summary
Constructors Constructor Description AbstractIdempotentRepository()
-
Method Summary
Modifier and Type Method Description boolean
contains(IdempotencyKey key)
protected abstract Map<IdempotencyKey,IdempotentRequestResponseWrapper>
getMap()
IdempotentResponseWrapper
getResponse(IdempotencyKey key)
Checks the cache for an existing call for this requestvoid
remove(IdempotencyKey key)
void
setResponse(IdempotencyKey key, IdempotentRequestWrapper request, IdempotentResponseWrapper idempotentResponse)
void
store(IdempotencyKey key, IdempotentRequestWrapper request)
-
Constructor Details
-
AbstractIdempotentRepository
public AbstractIdempotentRepository()
-
-
Method Details
-
contains
- Specified by:
contains
in interfaceIdempotentRepository
- Returns:
-
getResponse
Description copied from interface:IdempotentRepository
Checks the cache for an existing call for this request- Specified by:
getResponse
in interfaceIdempotentRepository
- Returns:
-
store
- Specified by:
store
in interfaceIdempotentRepository
-
setResponse
public void setResponse(IdempotencyKey key, IdempotentRequestWrapper request, IdempotentResponseWrapper idempotentResponse)- Specified by:
setResponse
in interfaceIdempotentRepository
-
remove
- Specified by:
remove
in interfaceIdempotentRepository
-
getMap
- Returns:
-