/** * Construct service which will process notification requests in batch. * After each request batch will wait <code>waitTimeInSec (set as 5sec)</code> for more request to come * before executing but not more than <code>maxWaitTimeInSec (set as 10sec)</code> * * Note: It is not recommended to use pooled connection */ public ApnsServiceBuilder asBatched() { return asBatched(5, 10); }
/** * Construct service which will process notification requests in batch. * After each request batch will wait <code>waitTimeInSec</code> for more request to come * before executing but not more than <code>maxWaitTimeInSec</code> * * Note: It is not recommended to use pooled connection * * @param waitTimeInSec * time to wait for more notification request before executing * batch * @param maxWaitTimeInSec * maximum wait time for batch before executing */ public ApnsServiceBuilder asBatched(int waitTimeInSec, int maxWaitTimeInSec) { return asBatched(waitTimeInSec, maxWaitTimeInSec, Executors.defaultThreadFactory()); }