@Override public AsyncEventQueue create(String asyncQueueId, AsyncEventListener listener) { if (listener == null) { throw new IllegalArgumentException( "AsyncEventListener cannot be null"); } AsyncEventQueue asyncEventQueue; if (cache instanceof CacheCreation) { asyncEventQueue = new AsyncEventQueueCreation(asyncQueueId, gatewaySenderAttributes, listener); ((CacheCreation) cache).addAsyncEventQueue(asyncEventQueue); } else { if (logger.isDebugEnabled()) { logger.debug("Creating GatewaySender that underlies the AsyncEventQueue"); } addAsyncEventListener(listener); InternalGatewaySender sender = (InternalGatewaySender) create(getSenderIdFromAsyncEventQueueId(asyncQueueId)); AsyncEventQueueImpl asyncEventQueueImpl = new AsyncEventQueueImpl(sender, listener); asyncEventQueue = asyncEventQueueImpl; cache.addAsyncEventQueue(asyncEventQueueImpl); if (!gatewaySenderAttributes.isManualStart()) { sender.start(); } } if (logger.isDebugEnabled()) { logger.debug("Returning AsyncEventQueue" + asyncEventQueue); } return asyncEventQueue; }
this.cache.addGatewaySender(sender); if (!this.attrs.isManualStart()) { sender.start(); this.cache.addGatewaySender(sender); if (!this.attrs.isManualStart()) { sender.start();
sender = new ParallelGatewaySenderImpl(this.cache, this.attrs); this.cache.addGatewaySender(sender); if (!this.attrs.isManualStart()) { sender.start(); sender = new SerialGatewaySenderImpl(this.cache, this.attrs); this.cache.addGatewaySender(sender); if (!this.attrs.isManualStart()) { sender.start();
this.isPersistence = attrs.isPersistenceEnabled(); this.alertThreshold = attrs.getAlertThreshold(); this.manualStart = attrs.isManualStart(); this.isParallel = attrs.isParallel(); this.isForInternalUse = attrs.isForInternalUse();