-
- All Implemented Interfaces:
-
com.architect.androidjavaruntime.library.config.IQueueConfig,com.architect.androidjavaruntime.library.config.ISenderConfig,com.architect.androidjavaruntime.library.config.ISessionConfig
public class Configuration implements ISenderConfig, ISessionConfig, IQueueConfig
-
-
Field Summary
Fields Modifier and Type Field Description private AtomicIntegermaxBatchCountprivate AtomicIntegermaxBatchIntervalMsprivate StringendpointUrlprivate AtomicLongsessionIntervalMs
-
Constructor Summary
Constructors Constructor Description Configuration()Constructs a new INSTANCE of a config
-
Method Summary
Modifier and Type Method Description voidsetMaxBatchCount(int maxBatchCount)Set the maximum size of a batch in bytes. voidsetMaxBatchIntervalMs(int maxBatchIntervalMs)Set the maximum interval allowed between calls to batchInvoke. synchronized StringgetEndpointUrl()Get the url to which payloads will be sent. synchronized voidsetEndpointUrl(String endpointUrl)Set the url to which payloads will be sent. voidsetSessionIntervalMs(long sessionIntervalMs)Set the interval at which sessions are renewed. intgetSenderReadTimeout()Get the timeout for reading the response from the data collector endpoint. voidsetSenderReadTimeout(int senderReadTimeout)Set the timeout for reading the response from the data collector endpoint. intgetSenderConnectTimeout()Get the timeout for connecting to the data collector endpoint. voidsetSenderConnectTimeout(int senderConnectTimeout)Set the timeout for connecting to the data collector endpoint. -
-
Method Detail
-
setMaxBatchCount
void setMaxBatchCount(int maxBatchCount)
Set the maximum size of a batch in bytes.
- Parameters:
maxBatchCount- the batchsize of data that will be queued until we send/persist it
-
setMaxBatchIntervalMs
void setMaxBatchIntervalMs(int maxBatchIntervalMs)
Set the maximum interval allowed between calls to batchInvoke.
- Parameters:
maxBatchIntervalMs- the amount of MS until we want to send out a batch of data
-
getEndpointUrl
synchronized String getEndpointUrl()
Get the url to which payloads will be sent.
-
setEndpointUrl
synchronized void setEndpointUrl(String endpointUrl)
Set the url to which payloads will be sent.
- Parameters:
endpointUrl- url of the server that receives our data
-
setSessionIntervalMs
void setSessionIntervalMs(long sessionIntervalMs)
Set the interval at which sessions are renewed.
- Parameters:
sessionIntervalMs- the interval at which sessions are renewed in Ms
-
getSenderReadTimeout
int getSenderReadTimeout()
Get the timeout for reading the response from the data collector endpoint.
-
setSenderReadTimeout
void setSenderReadTimeout(int senderReadTimeout)
Set the timeout for reading the response from the data collector endpoint.
- Parameters:
senderReadTimeout- the timeout for reading the response from the endpoint
-
getSenderConnectTimeout
int getSenderConnectTimeout()
Get the timeout for connecting to the data collector endpoint.
-
setSenderConnectTimeout
void setSenderConnectTimeout(int senderConnectTimeout)
Set the timeout for connecting to the data collector endpoint.
- Parameters:
senderConnectTimeout- the timeout for connecting to the data collector endpoint in Ms
-
-
-
-