Package org.copperengine.core.tranzient
Class DefaultEarlyResponseContainer
- java.lang.Object
-
- org.copperengine.core.tranzient.DefaultEarlyResponseContainer
-
- All Implemented Interfaces:
EarlyResponseContainer
public class DefaultEarlyResponseContainer extends java.lang.Object implements EarlyResponseContainer
Default implementation of theEarlyResponseContainer
interface. Early response are stored for a configurable time interval. Later on they may be removed.
-
-
Constructor Summary
Constructors Constructor Description DefaultEarlyResponseContainer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Response<?>>
get(java.lang.String correlationId)
Gets and removes the responses for the provided correlationId if they exists.int
getCheckInterval()
int
getLowerBorderResponseMapSize()
long
getMinHoldBackTime()
int
getUpperBorderResponseMapSize()
void
put(Response<?> response)
Puts an early reponse into the containervoid
setCheckInterval(int checkInterval)
void
setLowerBorderResponseMapSize(int lowerBorderResponseMapSize)
void
setMinHoldBackTime(long minHoldBackTime)
void
setUpperBorderResponseMapSize(int upperBorderResponseMapSize)
void
shutdown()
Shutdown the containervoid
startup()
Startup the container
-
-
-
Method Detail
-
put
public void put(Response<?> response)
Description copied from interface:EarlyResponseContainer
Puts an early reponse into the container- Specified by:
put
in interfaceEarlyResponseContainer
- Parameters:
response
- the response to be put into the container
-
get
public java.util.List<Response<?>> get(java.lang.String correlationId)
Description copied from interface:EarlyResponseContainer
Gets and removes the responses for the provided correlationId if they exists.- Specified by:
get
in interfaceEarlyResponseContainer
- Parameters:
correlationId
- correlationId for which responses shall be get and removed.- Returns:
- the responses or an empty list if there is no response for the provided correlationId.
-
startup
public void startup()
Description copied from interface:EarlyResponseContainer
Startup the container- Specified by:
startup
in interfaceEarlyResponseContainer
-
shutdown
public void shutdown()
Description copied from interface:EarlyResponseContainer
Shutdown the container- Specified by:
shutdown
in interfaceEarlyResponseContainer
-
setUpperBorderResponseMapSize
public void setUpperBorderResponseMapSize(int upperBorderResponseMapSize)
-
setLowerBorderResponseMapSize
public void setLowerBorderResponseMapSize(int lowerBorderResponseMapSize)
-
getLowerBorderResponseMapSize
public int getLowerBorderResponseMapSize()
-
getUpperBorderResponseMapSize
public int getUpperBorderResponseMapSize()
-
setMinHoldBackTime
public void setMinHoldBackTime(long minHoldBackTime)
-
getMinHoldBackTime
public long getMinHoldBackTime()
-
setCheckInterval
public void setCheckInterval(int checkInterval)
-
getCheckInterval
public int getCheckInterval()
-
-