if (!this.sender.isBatchConflationEnabled() && logger.isDebugEnabled()) { logger.debug( "ParallelGatewaySenderQueue#remove: Got EntryNotFoundException while removing key {} for {} for bucket = {} for GatewaySender {}",
private void createGatewaySender() { // Mock gateway sender this.sender = ParallelGatewaySenderHelper.createGatewaySender(this.cache); when(this.sender.isBatchConflationEnabled()).thenReturn(true); when(sender.getStatistics()).thenReturn(mock(GatewaySenderStats.class)); }
if (sp.isBatchConflationEnabled != sender.isBatchConflationEnabled()) { throw new IllegalStateException( String.format( "Cannot create Gateway Sender %s with isBatchConflationEnabled %s because another cache has the same Gateway Sender defined with isBatchConflationEnabled %s", sp.Id, sp.isBatchConflationEnabled, sender.isBatchConflationEnabled()));
public List conflate(List<GatewaySenderEventImpl> events) { List<GatewaySenderEventImpl> conflatedEvents = null; if (this.sender.isBatchConflationEnabled() && events.size() > 1) { Map<ConflationKey, GatewaySenderEventImpl> conflatedEventsMap = new LinkedHashMap<ConflationKey, GatewaySenderEventImpl>();
public SerialGatewaySenderQueue(AbstractGatewaySender abstractSender, String regionName, CacheListener listener) { // The queue starts out with headKey and tailKey equal to -1 to force // them to be initialized from the region. this.regionName = regionName; this.headKey = -1; this.tailKey.set(-1); this.indexes = new HashMap<String, Map<Object, Long>>(); this.enableConflation = abstractSender.isBatchConflationEnabled(); this.diskStoreName = abstractSender.getDiskStoreName(); this.batchSize = abstractSender.getBatchSize(); this.enablePersistence = abstractSender.isPersistenceEnabled(); if (this.enablePersistence) { this.isDiskSynchronous = abstractSender.isDiskSynchronous(); } else { this.isDiskSynchronous = false; } this.maximumQueueMemory = abstractSender.getMaximumMemeoryPerDispatcherQueue(); this.stats = abstractSender.getStatistics(); initializeRegion(abstractSender, listener); // Increment queue size. Fix for bug 51988. this.stats.incQueueSize(this.region.size()); this.removalThread = new BatchRemovalThread(abstractSender.getCache()); this.removalThread.start(); this.sender = abstractSender; if (logger.isDebugEnabled()) { logger.debug("{}: Contains {} elements", this, size()); } }
if (sender.isBatchConflationEnabled()) { initializeConflationThreadPool();
prQ.enableConflation(sender.isBatchConflationEnabled());
prQ.enableConflation(sender.isBatchConflationEnabled()); if (isAccessor) return; // return from here if accessor node