/** Sets maximum number of messages that can be enqueued in a client-queue. **/ public int getMaximumMessageCount() { return cacheServer.getMaximumMessageCount(); }
Integer.toString(cacheServer.getMaxConnections())); cacheServerAttributes.put("maximum-message-count", Integer.toString(cacheServer.getMaximumMessageCount())); cacheServerAttributes.put("maximum-time-between-pings", Integer.toString(cacheServer.getMaximumTimeBetweenPings()));
atts.addAttribute("", "", MAX_THREADS, "", String.valueOf(bridge.getMaxThreads())); if (generateDefaults() || bridge.getMaximumMessageCount() != CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT) atts.addAttribute("", "", MAXIMUM_MESSAGE_COUNT, "", String.valueOf(bridge.getMaximumMessageCount()));
/** * Returns whether or not this cache server has the same configuration as another cache server. */ @Override public boolean sameAs(CacheServer other) { ClientSubscriptionConfig cscThis = this.getClientSubscriptionConfig(); ClientSubscriptionConfig cscOther = other.getClientSubscriptionConfig(); boolean result = isCacheServerPortEquals(other) && this.getSocketBufferSize() == other.getSocketBufferSize() && this.getMaximumTimeBetweenPings() == other.getMaximumTimeBetweenPings() && this.getNotifyBySubscription() == other.getNotifyBySubscription() && this.getMaxConnections() == other.getMaxConnections() && this.getMaxThreads() == other.getMaxThreads() && this.getMaximumMessageCount() == other.getMaximumMessageCount() && this.getMessageTimeToLive() == other.getMessageTimeToLive() && this.getTcpNoDelay() == other.getTcpNoDelay() && cscThis.getCapacity() == cscOther.getCapacity() && cscThis.getEvictionPolicy().equals(cscOther.getEvictionPolicy()); String diskStoreName = cscThis.getDiskStoreName(); if (diskStoreName != null) { result = result && diskStoreName.equals(cscOther.getDiskStoreName()); } else { result = result && cscThis.getOverflowDirectory().equals(cscOther.getOverflowDirectory()); } return result; }
/** * Returns whether or not this cache server has the same configuration as another cache server. */ public boolean sameAs(CacheServer other) { return getPort() == other.getPort() && eq(getBindAddress(), other.getBindAddress()) && getSocketBufferSize() == other.getSocketBufferSize() && getMaximumTimeBetweenPings() == other.getMaximumTimeBetweenPings() && getNotifyBySubscription() == other.getNotifyBySubscription() && getMaxConnections() == other.getMaxConnections() && getMaxThreads() == other.getMaxThreads() && getMaximumMessageCount() == other.getMaximumMessageCount() && getMessageTimeToLive() == other.getMessageTimeToLive() && Arrays.equals(getGroups(), other.getGroups()) && getLoadProbe().equals(other.getLoadProbe()) && getLoadPollInterval() == other.getLoadPollInterval() && getTcpNoDelay() == other.getTcpNoDelay(); } }
setTcpNoDelay(other.getTcpNoDelay()); setMaximumTimeBetweenPings(other.getMaximumTimeBetweenPings()); setMaximumMessageCount(other.getMaximumMessageCount()); setMessageTimeToLive(other.getMessageTimeToLive()); setGroups(other.getGroups());
setTcpNoDelay(other.getTcpNoDelay()); setMaximumTimeBetweenPings(other.getMaximumTimeBetweenPings()); setMaximumMessageCount(other.getMaximumMessageCount()); setMessageTimeToLive(other.getMessageTimeToLive()); setGroups(other.getGroups());
when(mockCacheServer.getLoadProbe()).thenThrow(newUnsupportedOperationException(NOT_SUPPORTED)); when(mockCacheServer.getMaxConnections()).thenAnswer(newGetter(maxConnections)); when(mockCacheServer.getMaximumMessageCount()).thenAnswer(newGetter(maxMessageCount)); when(mockCacheServer.getMaximumTimeBetweenPings()).thenAnswer(newGetter(maxTimeBetweenPings)); when(mockCacheServer.getMaxThreads()).thenAnswer(newGetter(maxThreads));
.withDetail(cacheServerKey(cacheServerIndex, "load-poll-interval"), cacheServer.getLoadPollInterval()) .withDetail(cacheServerKey(cacheServerIndex, "max-connections"), cacheServer.getMaxConnections()) .withDetail(cacheServerKey(cacheServerIndex, "max-message-count"), cacheServer.getMaximumMessageCount()) .withDetail(cacheServerKey(cacheServerIndex, "max-threads"), cacheServer.getMaxThreads()) .withDetail(cacheServerKey(cacheServerIndex, "max-time-between-pings"), cacheServer.getMaximumTimeBetweenPings())