public void setSocketBufferSize(int socketBufferSize) { synchronized (this.controlLock) { checkRunning(); this._socketBufferSize = socketBufferSize; } }
public void addListener(GatewayEventListener listener) throws GatewayException { synchronized (this.controlLock) { checkRunning(); // If endpoints are already defined, throw an exception if (hasEndpoints()) { throw new GatewayException(LocalizedStrings.GatewayImpl_GATEWAY_0_CANNOT_DEFINE_A_LISTENER_BECAUSE_AT_LEAST_ONE_ENDPOINT_IS_ALREADY_DEFINED_BOTH_LISTENERS_AND_ENDPOINTS_CANNOT_BE_DEFINED_FOR_THE_SAME_GATEWAY.toLocalizedString(this._id)); } List newListeners = new ArrayList(this._listeners); newListeners.add(listener); this._listeners = Collections.unmodifiableList(newListeners); } }
public void setSocketReadTimeout(int socketReadTimeout) { synchronized (this.controlLock) { checkRunning(); getLogger().warning(LocalizedStrings.GatewayImpl_GATEWAY_SOCKET_READ_TIMEOUT_DISABLED); // do nothing on purpose... // setSocketReadTimeout is now optional and this impl ignores it // setSocketReadTimeout was causing too many problems because customers // kept using too small of a value } }
public void setQueueAttributes(GatewayQueueAttributes queueAttributes) { synchronized (this.controlLock) { checkRunning(); // See bug 44558. The gateway.stop method has been changed to close the // region. If the previous queue attributes enabled persistence and the // new ones don't, destroy the disk files. Don't use the existing queue // attributes since they may have been modified in place. If the event // processor is null, the gateway has not been started, so there isn't any // way to know the previous state. This method will throw an // IllegalStateException if the previous state is incompatible with the // new state. if (this._eventProcessor != null && ((SingleWriteSingleReadRegionQueue) this._eventProcessor._eventQueue) .isPersistent() && (!queueAttributes.getEnablePersistence())) { this._eventProcessor.destroyQueuePersistenceFiles(); } this._queueAttributes = queueAttributes; } }