removed BridgeServer
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3eaf0e94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3eaf0e94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3eaf0e94 Branch: refs/heads/feature/GEODE-243 Commit: 3eaf0e94a3e8100e044285f069b581c4e1f882ce Parents: 39dc0c6 Author: Darrel Schneider <dschnei...@pivotal.io> Authored: Mon Aug 31 10:07:35 2015 -0700 Committer: Darrel Schneider <dschnei...@pivotal.io> Committed: Mon Aug 31 10:07:35 2015 -0700 ---------------------------------------------------------------------- .../gemfire/admin/SystemMemberBridgeServer.java | 2 +- .../gemfire/admin/SystemMemberCache.java | 27 -- .../DistributedSystemHealthMonitor.java | 2 +- .../admin/internal/SystemMemberCacheImpl.java | 17 +- .../jmx/internal/SystemMemberCacheJmxImpl.java | 13 - .../java/com/gemstone/gemfire/cache/Cache.java | 24 - .../gemfire/cache/DynamicRegionFactory.java | 4 +- .../gemfire/cache/util/BridgeServer.java | 442 ------------------- .../gemfire/internal/admin/GemFireVM.java | 2 +- .../admin/remote/BridgeServerResponse.java | 8 +- .../admin/remote/DurableClientInfoResponse.java | 4 +- .../internal/admin/remote/RemoteCacheInfo.java | 6 +- .../internal/admin/remote/RemoteGemFireVM.java | 2 +- .../internal/cache/AbstractBridgeServer.java | 3 +- .../cache/FindDurableQueueProcessor.java | 2 +- .../internal/cache/GemFireCacheImpl.java | 89 ++-- .../gemfire/internal/cache/GridAdvisor.java | 2 +- .../gemfire/internal/cache/LocalRegion.java | 2 +- .../internal/cache/ha/HARegionQueue.java | 2 +- .../cache/tier/InternalBridgeMembership.java | 6 +- .../cache/tier/sockets/AcceptorImpl.java | 4 +- .../internal/cache/xmlcache/CacheCreation.java | 9 - .../cache/xmlcache/ClientCacheCreation.java | 5 - .../cache/ConnectionPoolAndLoaderDUnitTest.java | 4 +- .../internal/AutoConnectionSourceDUnitTest.java | 2 +- .../AutoConnectionSourceWithUDPDUnitTest.java | 4 +- .../internal/ConnectionPoolImplJUnitTest.java | 8 +- .../internal/LocatorLoadBalancingDUnitTest.java | 6 +- .../cache/client/internal/LocatorTestBase.java | 12 +- .../query/dunit/QueryUsingPoolDUnitTest.java | 8 +- .../cache/query/dunit/RemoteQueryDUnitTest.java | 8 +- ...rrentIndexInitOnOverflowRegionDUnitTest.java | 4 +- .../gemfire/cache30/BridgeTestCase.java | 10 +- .../gemfire/cache30/Bug38741DUnitTest.java | 2 +- .../gemfire/cache30/CacheXml40DUnitTest.java | 8 +- .../gemfire/cache30/CacheXml41DUnitTest.java | 5 +- .../gemfire/cache30/CacheXml45DUnitTest.java | 4 +- .../gemfire/cache30/CacheXml51DUnitTest.java | 8 +- .../internal/cache/Bug39079DUnitTest.java | 6 +- ...ssagesRegionCreationAndDestroyJUnitTest.java | 8 +- .../cache/ClientServerGetAllDUnitTest.java | 4 +- .../cache/ConcurrentMapOpsDUnitTest.java | 4 +- .../internal/cache/DiskRegionJUnitTest.java | 9 +- .../internal/cache/GridAdvisorDUnitTest.java | 50 +-- .../internal/cache/HABug36773DUnitTest.java | 4 +- .../HAOverflowMemObjectSizerDUnitTest.java | 4 +- .../cache/ha/Bug36853EventsExpiryDUnitTest.java | 4 +- .../internal/cache/ha/Bug48571DUnitTest.java | 2 +- .../cache/ha/EventIdOptimizationDUnitTest.java | 6 +- .../internal/cache/ha/FailoverDUnitTest.java | 8 +- .../internal/cache/ha/HABugInPutDUnitTest.java | 2 +- .../internal/cache/ha/HAClearDUnitTest.java | 2 +- .../cache/ha/HAConflationDUnitTest.java | 2 +- .../internal/cache/ha/HADuplicateDUnitTest.java | 2 +- .../cache/ha/HAEventIdPropagationDUnitTest.java | 2 +- .../internal/cache/ha/HAGIIDUnitTest.java | 10 +- .../cache/ha/HARQueueNewImplDUnitTest.java | 34 +- .../cache/ha/HASlowReceiverDUnitTest.java | 4 +- .../ha/OperationsPropagationDUnitTest.java | 2 +- .../internal/cache/ha/PutAllDUnitTest.java | 2 +- .../cache/ha/StatsBugDUnitDisabledTest.java | 8 +- .../tier/sockets/AcceptorImplJUnitTest.java | 62 +-- ...mpatibilityHigherVersionClientDUnitTest.java | 4 +- .../BridgeServerMaxConnectionsJUnitTest.java | 7 +- .../tier/sockets/BridgeWriterMiscDUnitTest.java | 16 +- .../cache/tier/sockets/Bug36269DUnitTest.java | 4 +- .../cache/tier/sockets/Bug36457DUnitTest.java | 4 +- .../cache/tier/sockets/Bug36805DUnitTest.java | 4 +- .../cache/tier/sockets/Bug36995DUnitTest.java | 8 +- .../cache/tier/sockets/Bug37210DUnitTest.java | 8 +- .../cache/tier/sockets/CacheServerTestUtil.java | 18 +- .../CacheServerTransactionsDUnitTest.java | 4 +- .../tier/sockets/ClearPropagationDUnitTest.java | 4 +- .../tier/sockets/ClientConflationDUnitTest.java | 6 +- .../sockets/ClientHealthMonitorJUnitTest.java | 6 +- .../sockets/ClientInterestNotifyDUnitTest.java | 8 +- .../cache/tier/sockets/ConflationDUnitTest.java | 6 +- .../tier/sockets/ConnectionProxyJUnitTest.java | 48 +- .../DataSerializerPropogationDUnitTest.java | 18 +- .../DestroyEntryPropagationDUnitTest.java | 12 +- .../DurableClientReconnectDUnitTest.java | 6 +- .../sockets/DurableClientStatsDUnitTest.java | 4 +- .../sockets/DurableRegistrationDUnitTest.java | 2 +- .../sockets/DurableResponseMatrixDUnitTest.java | 4 +- .../sockets/EventIDVerificationDUnitTest.java | 4 +- .../ForceInvalidateEvictionDUnitTest.java | 10 +- .../cache/tier/sockets/HAInterestBaseTest.java | 40 +- .../sockets/HAStartupAndFailoverDUnitTest.java | 22 +- .../sockets/InterestListEndpointDUnitTest.java | 16 +- .../sockets/InterestListFailoverDUnitTest.java | 6 +- .../sockets/InterestListRecoveryDUnitTest.java | 8 +- .../sockets/InterestResultPolicyDUnitTest.java | 4 +- .../tier/sockets/RedundancyLevelTestBase.java | 36 +- .../tier/sockets/RegionCloseDUnitTest.java | 12 +- ...erInterestBeforeRegionCreationDUnitTest.java | 4 +- .../sockets/RegisterInterestKeysDUnitTest.java | 4 +- .../sockets/ReliableMessagingDUnitTest.java | 8 +- .../sockets/UpdatePropagationDUnitTest.java | 10 +- ...UpdatesFromNonInterestEndPointDUnitTest.java | 4 +- .../pdx/PdxFormatterPutGetJUnitTest.java | 4 +- 100 files changed, 430 insertions(+), 974 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberBridgeServer.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberBridgeServer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberBridgeServer.java index 4cef371..26b36b6 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberBridgeServer.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberBridgeServer.java @@ -14,7 +14,7 @@ import com.gemstone.gemfire.cache.server.ServerLoadProbe; * com.gemstone.gemfire.cache.util.BridgeServer BridgeServer} that * serves the contents of a system member's cache. * - * @see SystemMemberCache#addBridgeServer + * @see SystemMemberCache#addCacheServer * * @author David Whitlock * @since 4.0 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberCache.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberCache.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberCache.java index 00749d6..14cf189 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberCache.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/SystemMemberCache.java @@ -160,33 +160,6 @@ public interface SystemMemberCache { public void refresh(); /** - * Adds a new, unstarted bridge server that will serve the contents - * of this cache. - * - * @see com.gemstone.gemfire.cache.Cache#addBridgeServer - * - * @since 4.0 - * @deprecated as of 5.7 use {@link #addCacheServer} instead. - */ - @Deprecated - public SystemMemberBridgeServer addBridgeServer() - throws AdminException; - - /** - * Returns the bridge servers that run in this member's VM. Note - * that this list will not be updated until {@link #refresh} is - * called. - * - * @see com.gemstone.gemfire.cache.Cache#getBridgeServers - * - * @since 4.0 - * @deprecated as of 5.7 use {@link #getCacheServers} instead. - */ - @Deprecated - public SystemMemberBridgeServer[] getBridgeServers() - throws AdminException; - - /** * Adds a new, unstarted cache server that will serve the contents * of this cache to clients. * http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthMonitor.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthMonitor.java index ca7f067..6058487 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthMonitor.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthMonitor.java @@ -373,7 +373,7 @@ class DistributedSystemHealthMonitor implements Runnable, GemFireVM { throw new UnsupportedOperationException(LocalizedStrings.DistributedSystemHealthMonitor_NOT_A_REAL_GEMFIREVM.toLocalizedString()); } - public AdminBridgeServer addBridgeServer(CacheInfo cache) + public AdminBridgeServer addCacheServer(CacheInfo cache) throws AdminException { throw new UnsupportedOperationException(LocalizedStrings.DistributedSystemHealthMonitor_NOT_A_REAL_GEMFIREVM.toLocalizedString()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberCacheImpl.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberCacheImpl.java index d823c5e..88792d8 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberCacheImpl.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberCacheImpl.java @@ -235,14 +235,9 @@ public class SystemMemberCacheImpl implements SystemMemberCache { public SystemMemberCacheServer addCacheServer() throws AdminException { - return (SystemMemberCacheServer)addBridgeServer(); - } - - public SystemMemberBridgeServer addBridgeServer() - throws AdminException { - AdminBridgeServer bridge = this.vm.addBridgeServer(this.info); - SystemMemberBridgeServer admin = + AdminBridgeServer bridge = this.vm.addCacheServer(this.info); + SystemMemberCacheServer admin = createSystemMemberBridgeServer(bridge); bridgeServers.put(bridge.getId(), admin); return admin; @@ -280,14 +275,6 @@ public class SystemMemberCacheImpl implements SystemMemberCache { return (SystemMemberCacheServer[]) bridges.toArray(array); }; - public SystemMemberBridgeServer[] getBridgeServers() - throws AdminException { - Collection bridges = getCacheServersCollection(); - SystemMemberBridgeServer[] array = - new SystemMemberBridgeServer[bridges.size()]; - return (SystemMemberBridgeServer[]) bridges.toArray(array); - } - /** * Creates a new instance of <Code>SystemMemberBridgeServer</code> * with the given configuration. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberCacheJmxImpl.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberCacheJmxImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberCacheJmxImpl.java index 8a7c582..8376719 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberCacheJmxImpl.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberCacheJmxImpl.java @@ -285,19 +285,6 @@ implements com.gemstone.gemfire.admin.jmx.internal.ManagedResource { } /** - * Creates a new bridge server MBean and returns its - * <code>ObjectName</code>. - * - * @since 4.0 - * @deprecated as of 5.7 - */ - @Deprecated - public ObjectName manageBridgeServer() - throws AdminException, MalformedObjectNameException { - return manageCacheServer(); - } - - /** * Returns the MBean <code>ObjectName</code>s for all cache servers * that serve this cache to clients. * http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java index 1886126..c6495d0 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/Cache.java @@ -19,7 +19,6 @@ import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.hdfs.HDFSStoreFactory; import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.snapshot.CacheSnapshotService; -import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.cache.util.GatewayConflictResolver; import com.gemstone.gemfire.cache.wan.GatewayReceiver; import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory; @@ -237,15 +236,6 @@ public interface Cache extends GemFireCache { public void setSearchTimeout(int seconds); /** - * Creates a new bridge server with the default configuration. - * - * @since 4.0 - * @deprecated as of 5.7 use {@link #addCacheServer} instead. - */ - @Deprecated - public BridgeServer addBridgeServer(); - - /** * Creates a new cache server, with the default configuration, * that will allow clients to access this cache. * <p>For the default configuration see the constants in @@ -257,20 +247,6 @@ public interface Cache extends GemFireCache { public CacheServer addCacheServer(); /** - * Returns a collection of all of the <code>BridgeServer</code>s - * that can serve the contents of this <code>Cache</code>. - * <p>Since <code>5.7</code> this method returns a <code>List</code - * instead of a <code>Collection</code>. - * - * @see #addBridgeServer - * - * @since 4.0 - * @deprecated as of 5.7 use {@link #getCacheServers} instead. - */ - @Deprecated - public List<CacheServer> getBridgeServers(); - - /** * Returns a collection of all of the <code>CacheServer</code>s * that can serve the contents of this <code>Cache</code> to clients. * http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DynamicRegionFactory.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DynamicRegionFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DynamicRegionFactory.java index d57e2b1..8239ea2 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DynamicRegionFactory.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/DynamicRegionFactory.java @@ -894,7 +894,7 @@ public abstract class DynamicRegionFactory { @Override protected boolean shouldNotifyBridgeClients() { - return getCache().getBridgeServers().size() > 0; + return getCache().getCacheServers().size() > 0; } // Over-ride the super behavior to perform the destruction of the dynamic region @@ -1005,7 +1005,7 @@ public abstract class DynamicRegionFactory { @Override final public boolean shouldNotifyBridgeClients() { - return getCache().getBridgeServers().size() > 0; + return getCache().getCacheServers().size() > 0; } // Over-ride the super behavior to perform the destruction of the dynamic region http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/BridgeServer.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/BridgeServer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/BridgeServer.java deleted file mode 100644 index ad77071..0000000 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/BridgeServer.java +++ /dev/null @@ -1,442 +0,0 @@ -/*========================================================================= - * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. - * This product is protected by U.S. and international copyright - * and intellectual property laws. Pivotal products are covered by - * one or more patents listed at http://www.pivotal.io/patents. - *========================================================================= - */ -package com.gemstone.gemfire.cache.util; - -import java.io.IOException; -import java.util.Set; - -import com.gemstone.gemfire.cache.ClientSession; -import com.gemstone.gemfire.distributed.DistributedMember; -import com.gemstone.gemfire.cache.client.Pool; -import com.gemstone.gemfire.cache.server.CacheServer; -import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig; -import com.gemstone.gemfire.cache.server.ServerLoadProbe; -import com.gemstone.gemfire.cache.server.internal.ConnectionCountProbe; - -/** - * A cache bridge server that serves the contents of a - * <code>Cache</code> to VMs in another distributed system via a - * socket. A bridge server is used in conjunction with a - * client {@link Pool} to connect two regions - * that reside in different distributed systems. - * - * @see com.gemstone.gemfire.cache.Cache#addBridgeServer - * @see com.gemstone.gemfire.cache.Cache#getBridgeServers - * - * @since 2.0.2 - * @deprecated as of 5.7 used {@link CacheServer} instead. - */ -@Deprecated -public interface BridgeServer { - - /** The default port on which a <Code>BridgeServer</code> is - * configured to serve. */ - public static final int DEFAULT_PORT = 40404; - - /** - * The default number of sockets accepted by a BridgeServer. - * When the maximum is reached the server will stop accepting new connections. - * Current value: 800 - * @since 5.7 - */ - public static final int DEFAULT_MAX_CONNECTIONS = 800; - // Value derived from common file descriptor limits for Unix sytems (1024)... - - /** - * The default limit to the maximum number of server threads that can be - * created to service client requests. Once this number of threads exist then - * connections must share the same thread to service their request. A selector - * is used to detect client connection requests and dispatch them to the thread - * pool. - * The default of <code>0</code> causes a thread to be bound to every connection - * and to be dedicated to detecting client requests on that connection. A selector - * is not used in this default mode. - * Current value: 0 - * @since 5.7 - */ - public static final int DEFAULT_MAX_THREADS = 0; - - /** The default notify-by-subscription value which tells the - * <Code>BridgeServer</code> whether or not to notify clients - * based on key subscription. */ - public static final boolean DEFAULT_NOTIFY_BY_SUBSCRIPTION = true; - - /** - * The default socket buffer size for socket buffers from the server - * to the client. - */ - public static final int DEFAULT_SOCKET_BUFFER_SIZE = 32768; - - /** - * The default maximum amount of time between client pings. This value - * is used by the <code>ClientHealthMonitor</code> to determine the - * health of this <code>BridgeServer</code>'s clients. - */ - public static final int DEFAULT_MAXIMUM_TIME_BETWEEN_PINGS = 60000; - - /** - * The default maximum number of messages that can be enqueued in a - * client-queue. - */ - public static final int DEFAULT_MAXIMUM_MESSAGE_COUNT = 230000; - - /** - * The default time (in seconds ) after which a message in the client queue - * will expire. - */ - public static final int DEFAULT_MESSAGE_TIME_TO_LIVE = 180; - - /** - * The default list of server groups a server belongs to. - * The current default is an empty list. - * @since 5.7 - */ - public static final String[] DEFAULT_GROUPS = new String[0]; - - /** - * The default load balancing probe. The default load balancing - * probe reports the connections counts of this server. - * @since 5.7 - * - */ - public static final ServerLoadProbe DEFAULT_LOAD_PROBE = new ConnectionCountProbe(); - - /** - * The default frequency at which to poll the load probe for the load - * on this server. Defaults to 5000 (5 seconds). - * @since 5.7 - */ - public static final long DEFAULT_LOAD_POLL_INTERVAL = 5000; - - /** - * The default ip address or host name that the server's socket will - * listen on for client connections. - * The current default is an empty string. - * @since 5.7 - */ - public static final String DEFAULT_BIND_ADDRESS = ""; - - /** - * The default ip address or host name that will be given to clients - * as the host this server is listening on. - * The current default is an empty string. - * @since 5.7 - */ - public static final String DEFAULT_HOSTNAME_FOR_CLIENTS = ""; - - /** - * Returns the port on which this server listens for clients. - */ - public int getPort(); - - /** - * Sets the port on which this server listens for clients. - * - * @throws IllegalStateException - * If this server is running - */ - public void setPort(int port); - - /** - * Returns a string representing the ip address or host name that this server - * will listen on. - * @return the ip address or host name that this server is to listen on - * @see #DEFAULT_BIND_ADDRESS - * @since 5.7 - */ - public String getBindAddress(); - /** - * Sets the ip address or host name that this server is to listen on for - * client connections. - * <p>Setting a specific bind address will cause the server to always - * use this address and ignore any address specified by "server-bind-address" - * or "bind-address" in the <code>gemfire.properties</code> file - * (see {@link com.gemstone.gemfire.distributed.DistributedSystem} - * for a description of these properties). - * <p> The value <code>""</code> does not override the <code>gemfire.properties</code>. - * It will cause the local machine's default address to be listened on if the - * properties file does not specify and address. - * If you wish to override the properties and want to have your server bind to all local - * addresses then use this bind address <code>"0.0.0.0"</code>. - * <p> A <code>null</code> value will be treated the same as the default <code>""</code>. - * @param address the ip address or host name that this server is to listen on - * @see #DEFAULT_BIND_ADDRESS - * @since 5.7 - */ - public void setBindAddress(String address); - /** - * Returns a string representing the ip address or host name that server locators - * will tell clients that this server is listening on. - * @return the ip address or host name to give to clients so they can connect - * to this server - * @see #DEFAULT_HOSTNAME_FOR_CLIENTS - * @since 5.7 - */ - public String getHostnameForClients(); - /** - * Sets the ip address or host name that this server is to listen on for - * client connections. - * <p>Setting a specific hostname-for-clients will cause server locators - * to use this value when telling clients how to connect to this server. - * This is useful in the case where the server may refer to itself with one - * hostname, but the clients need to use a different hostname to find the - * server. - * <p> The value <code>""</code> causes the <code>bind-address</code> to be given to clients. - * <p> A <code>null</code> value will be treated the same as the default <code>""</code>. - * @param name the ip address or host name that will be given to clients - * so they can connect to this server - * @see #DEFAULT_HOSTNAME_FOR_CLIENTS - * @since 5.7 - */ - public void setHostnameForClients(String name); - /** - * Sets whether or not this server should notify clients based on - * key subscription. - * - * If false, then an update to any key on the server causes an update to - * be sent to all clients. This update does not push the actual data to the - * clients. Instead, it causes the client to locally invalidate or destroy - * the corresponding entry. The next time the client requests the key, it - * goes to the server for the value. - * - * If true, then an update to any key on the server causes an update to be - * sent to only those clients who have registered interest in that key. Other - * clients are not notified of the change. In addition, the actual value is - * pushed to the client. The client does not need to request the new value - * from the server. - * - * @since 4.2 - * @deprecated as of 6.0.1. This method is no more in use, by default - * notifyBySubscription attribute is set to true. - */ - @Deprecated - public void setNotifyBySubscription(boolean b); - - /** - * Answers whether or not this server should notify clients based on - * key subscription. - * - * @since 4.2 - * @deprecated as of 6.0.1. This method is no more in use, by default - * notifyBySubscription attribute is set to true. - */ - @Deprecated - public boolean getNotifyBySubscription(); - - /** - * Sets the buffer size in bytes of the socket connection for this - * <code>BridgeServer</code>. The default is 32768 bytes. - * - * @param socketBufferSize The size in bytes of the socket buffer - * - * @since 4.2.1 - */ - public void setSocketBufferSize(int socketBufferSize); - - /** - * Returns the configured buffer size of the socket connection for this - * <code>BridgeServer</code>. The default is 32768 bytes. - * @return the configured buffer size of the socket connection for this - * <code>BridgeServer</code> - * - * @since 4.2.1 - */ - public int getSocketBufferSize(); - - /** - * Sets the maximum amount of time between client pings. This value is - * used by the <code>ClientHealthMonitor</code> to determine the health - * of this <code>BridgeServer</code>'s clients. The default is 60000 ms. - * - * @param maximumTimeBetweenPings The maximum amount of time between client - * pings - * - * @since 4.2.3 - */ - public void setMaximumTimeBetweenPings(int maximumTimeBetweenPings); - - /** - * Returns the maximum amount of time between client pings. This value is - * used by the <code>ClientHealthMonitor</code> to determine the health - * of this <code>BridgeServer</code>'s clients. The default is 60000 ms. - * @return the maximum amount of time between client pings. - * - * @since 4.2.3 - */ - public int getMaximumTimeBetweenPings(); - - /** - * Starts this server. Once the server is running, its - * configuration cannot be changed. - * - * @throws IOException - * If an error occurs while starting the server - */ - public void start() throws IOException; - - /** - * Returns whether or not this server is running - */ - public boolean isRunning(); - - /** - * Stops this server. Note that the - * <code>BridgeServer</code> can be reconfigured and restarted if - * desired. - */ - public void stop(); - - /** - * Returns the maximum allowed client connections - */ - public int getMaxConnections(); - - /** - * Sets the maxium number of client connections allowed. - * When the maximum is reached the server will stop accepting - * connections. - * - * @see #DEFAULT_MAX_CONNECTIONS - */ - public void setMaxConnections(int maxCons); - - /** - * Returns the maxium number of threads allowed in this server to service - * client requests. - * The default of <code>0</code> causes the server to dedicate a thread for - * every client connection. - * @since 5.1 - */ - public int getMaxThreads(); - - /** - * Sets the maxium number of threads allowed in this server to service - * client requests. - * The default of <code>0</code> causes the server to dedicate a thread for - * every client connection. - * - * @see #DEFAULT_MAX_THREADS - * @since 5.1 - */ - public void setMaxThreads(int maxThreads); - - /** - * Returns the maximum number of messages that can be enqueued in a - * client-queue. - */ - public int getMaximumMessageCount(); - - /** - * Sets maximum number of messages that can be enqueued in a client-queue. - * - * @see #DEFAULT_MAXIMUM_MESSAGE_COUNT - */ - public void setMaximumMessageCount(int maxMessageCount); - - /** - * Returns the time (in seconds ) after which a message in the client queue - * will expire. - */ - public int getMessageTimeToLive(); - - /** - * Sets the time (in seconds ) after which a message in the client queue - * will expire.Expiry settings are applicable for the secondary queues only - * This setting has no impact on the primary queue. - * - * @see #DEFAULT_MESSAGE_TIME_TO_LIVE - */ - public void setMessageTimeToLive(int messageTimeToLive); - - /** - * Returns the <code>ClientSession</code> associated with the - * <code>DistributedMember</code> - * @return the <code>ClientSession</code> associated with the - * <code>DistributedMember</code> - * @since 5.6 - */ - public ClientSession getClientSession(DistributedMember member); - - /** - * Returns the <code>ClientSession</code> associated with the - * durable client id - * @return the <code>ClientSession</code> associated with the - * durable - * @since 5.6 - */ - public ClientSession getClientSession(String durableClientId); - - /** - * Returns a set of all <code>ClientSession</code>s - * @return a set of all <code>ClientSession</code>s - */ - public Set getAllClientSessions(); - - /** - * Sets the list of server groups this cache server will belong to. - * By default cache servers belong to the default global server group - * which all cache servers always belong to. - * @param groups possibly empty array of <code>String</code> where each string - * is a server groups that this cache server will be a member of. - * @see #DEFAULT_GROUPS - * @since 5.7 - */ - public void setGroups(String[] groups); - /** - * Returns the list of server groups that this cache server belongs to. - * @return a possibly empty array of <code>String</code>s where - * each string is a server group. Modifying this array will not change the - * server groups that this cache server belongs to. - * @since 5.7 - */ - public String[] getGroups(); - - /** - * Get the load probe for this cache server. See - * {@link ServerLoadProbe} for details on the load probe. - * @return the load probe used by this cache - * server. - * @since 5.7 - */ - public ServerLoadProbe getLoadProbe(); - - /** - * Set the load probe for this cache server. See - * {@link ServerLoadProbe} for details on how to implement - * a load probe. - * @param loadProbe the load probe to use for - * this cache server. - * @since 5.7 - */ - public void setLoadProbe(ServerLoadProbe loadProbe); - - /** - * Get the frequency in milliseconds to poll the load probe on this cache - * server. - * - * @return the frequency in milliseconds that we will poll the load probe. - */ - public long getLoadPollInterval(); - - /** - * Set the frequency in milliseconds to poll the load probe on this cache - * server - * @param loadPollInterval the frequency in milliseconds to poll - * the load probe. Must be greater than 0. - */ - public void setLoadPollInterval(long loadPollInterval); - - /** - * Get the ClientSubscriptionConfig for this cache server. See - * {@link ClientSubscriptionConfig} for details on the client subscription configuration. - * - * @return ClientSubscriptionConfig - * @since 5.7 - */ - public ClientSubscriptionConfig getClientSubscriptionConfig(); -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/GemFireVM.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/GemFireVM.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/GemFireVM.java index 289587a..1223152 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/GemFireVM.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/GemFireVM.java @@ -314,7 +314,7 @@ public interface GemFireVM { * * @since 4.0 */ - public AdminBridgeServer addBridgeServer(CacheInfo cache) + public AdminBridgeServer addCacheServer(CacheInfo cache) throws AdminException; /** http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/BridgeServerResponse.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/BridgeServerResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/BridgeServerResponse.java index 62eae9b..8b362a9 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/BridgeServerResponse.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/BridgeServerResponse.java @@ -56,7 +56,7 @@ public final class BridgeServerResponse extends AdminResponse { switch (operation) { case BridgeServerRequest.ADD_OPERATION: { BridgeServerImpl bridge = - (BridgeServerImpl) cache.addBridgeServer(); + (BridgeServerImpl) cache.addCacheServer(); m.bridgeInfo = new RemoteBridgeServer(bridge); break; } @@ -65,7 +65,7 @@ public final class BridgeServerResponse extends AdminResponse { int id = request.getBridgeId(); // Note that since this is only an informational request // it is not necessary to synchronize on allBridgeServersLock - for (Iterator iter = cache.getBridgeServers().iterator(); + for (Iterator iter = cache.getCacheServers().iterator(); iter.hasNext(); ) { BridgeServerImpl bridge = (BridgeServerImpl) iter.next(); if (System.identityHashCode(bridge) == id) { @@ -81,7 +81,7 @@ public final class BridgeServerResponse extends AdminResponse { case BridgeServerRequest.START_OPERATION: { RemoteBridgeServer config = request.getBridgeInfo(); - for (Iterator iter = cache.getBridgeServers().iterator(); + for (Iterator iter = cache.getCacheServers().iterator(); iter.hasNext(); ) { BridgeServerImpl bridge = (BridgeServerImpl) iter.next(); if (System.identityHashCode(bridge) == config.getId()) { @@ -99,7 +99,7 @@ public final class BridgeServerResponse extends AdminResponse { case BridgeServerRequest.STOP_OPERATION: { RemoteBridgeServer config = request.getBridgeInfo(); - for (Iterator iter = cache.getBridgeServers().iterator(); + for (Iterator iter = cache.getCacheServers().iterator(); iter.hasNext(); ) { BridgeServerImpl bridge = (BridgeServerImpl) iter.next(); if (System.identityHashCode(bridge) == config.getId()) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DurableClientInfoResponse.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DurableClientInfoResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DurableClientInfoResponse.java index dd5aeba..3000753 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DurableClientInfoResponse.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DurableClientInfoResponse.java @@ -45,9 +45,9 @@ public class DurableClientInfoResponse extends AdminResponse try { GemFireCacheImpl c = (GemFireCacheImpl)CacheFactory.getInstanceCloseOk(dm .getSystem()); - if (c.getBridgeServers().size() > 0) { + if (c.getCacheServers().size() > 0) { - BridgeServerImpl server = (BridgeServerImpl)c.getBridgeServers() + BridgeServerImpl server = (BridgeServerImpl)c.getCacheServers() .iterator().next(); switch (request.action) { case DurableClientInfoRequest.HAS_DURABLE_CLIENT_REQUEST: { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java index 689ef92..a3a283d 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java @@ -12,7 +12,7 @@ import com.gemstone.gemfire.DataSerializer; import com.gemstone.gemfire.internal.admin.*; //import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; @@ -79,11 +79,11 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable { // Note that since this is only a snapshot, so no synchronization // on allBridgeServersLock is needed. - Collection bridges = c.getBridgeServers(); + Collection bridges = c.getCacheServers(); this.bridgeServerIds = new int[bridges.size()]; Iterator iter = bridges.iterator(); for (int i = 0; iter.hasNext(); i++) { - BridgeServer bridge = (BridgeServer) iter.next(); + CacheServer bridge = (CacheServer) iter.next(); this.bridgeServerIds[i] = System.identityHashCode(bridge); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java index 8c18e61..ab64026 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGemFireVM.java @@ -672,7 +672,7 @@ public abstract class RemoteGemFireVM implements GemFireVM { return setCacheConfigValue(c, SEARCH_TIMEOUT_CODE, v); } - public AdminBridgeServer addBridgeServer(CacheInfo cache) + public AdminBridgeServer addCacheServer(CacheInfo cache) throws AdminException { BridgeServerRequest request = http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBridgeServer.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBridgeServer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBridgeServer.java index 383239e..cefc698 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBridgeServer.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBridgeServer.java @@ -16,7 +16,6 @@ import com.gemstone.gemfire.cache.util.BridgeMembership; import com.gemstone.gemfire.cache.util.BridgeMembershipEvent; import com.gemstone.gemfire.cache.util.BridgeMembershipListener; import com.gemstone.gemfire.cache.util.BridgeMembershipListenerAdapter; -import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.distributed.internal.DM; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; @@ -34,7 +33,7 @@ import java.util.Set; * @author darrel * @since 5.7 */ -public abstract class AbstractBridgeServer implements CacheServer, BridgeServer { +public abstract class AbstractBridgeServer implements CacheServer { public static final String TEST_OVERRIDE_DEFAULT_PORT_PROPERTY = "gemfire.test.CacheServer.OVERRIDE_DEFAULT_PORT"; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindDurableQueueProcessor.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindDurableQueueProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindDurableQueueProcessor.java index 1366f94..96db451 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindDurableQueueProcessor.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindDurableQueueProcessor.java @@ -76,7 +76,7 @@ public class FindDurableQueueProcessor extends ReplyProcessor21 { private static void findLocalDurableQueues(ClientProxyMembershipID proxyId, ArrayList<ServerLocation> matches) { Cache c = GemFireCacheImpl.getInstance(); if(c!=null) { - List l = c.getBridgeServers(); + List l = c.getCacheServers(); if(l!=null) { Iterator i = l.iterator(); while(i.hasNext()) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java index 69d3a2f..c7ba070 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java @@ -136,7 +136,6 @@ import com.gemstone.gemfire.cache.query.internal.cq.CqService; import com.gemstone.gemfire.cache.query.internal.cq.CqServiceProvider; import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.snapshot.CacheSnapshotService; -import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.cache.util.GatewayConflictResolver; import com.gemstone.gemfire.cache.util.ObjectSizer; import com.gemstone.gemfire.cache.wan.GatewayReceiver; @@ -371,11 +370,11 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer private volatile DistributionAdvisee sqlfAdvisee; /** - * the list of all bridge servers. CopyOnWriteArrayList is used to allow concurrent add, remove and retrieval - * operations. It is assumed that the traversal operations on bridge servers list vastly outnumber the mutative + * the list of all cache servers. CopyOnWriteArrayList is used to allow concurrent add, remove and retrieval + * operations. It is assumed that the traversal operations on cache servers list vastly outnumber the mutative * operations such as add, remove. */ - private volatile List allBridgeServers = new CopyOnWriteArrayList(); + private volatile List allCacheServers = new CopyOnWriteArrayList(); /** * Controls updates to the list of all gateway senders @@ -664,7 +663,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer sb.append("; lockLease = " + this.lockLease); sb.append("; lockTimeout = " + this.lockTimeout); // sb.append("; rootRegions = (" + this.rootRegions + ")"); - // sb.append("; bridgeServers = (" + this.bridgeServers + ")"); + // sb.append("; cacheServers = (" + this.cacheServers + ")"); // sb.append("; regionAttributes = (" + this.listRegionAttributes()); // sb.append("; gatewayHub = " + gatewayHub); if (this.creationStack != null) { @@ -1513,7 +1512,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer } /** - * Close the distributed system, bridge servers, and gateways. Clears the rootRegions and partitionedRegions map. + * Close the distributed system, cache servers, and gateways. Clears the rootRegions and partitionedRegions map. * Marks the cache as closed. * * @see SystemFailure#emergencyClose() @@ -1546,14 +1545,14 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer inst.disconnectCause = SystemFailure.getFailure(); inst.isClosing = true; - // Clear bridge servers + // Clear cache servers if (DEBUG) { - System.err.println("DEBUG: Close bridge servers"); + System.err.println("DEBUG: Close cache servers"); } { - Iterator allBridgeServersItr = inst.allBridgeServers.iterator(); - while (allBridgeServersItr.hasNext()) { - BridgeServerImpl bs = (BridgeServerImpl) allBridgeServersItr.next(); + Iterator allCacheServersItr = inst.allCacheServers.iterator(); + while (allCacheServersItr.hasNext()) { + BridgeServerImpl bs = (BridgeServerImpl) allCacheServersItr.next(); AcceptorImpl ai = bs.getAcceptor(); if (ai != null) { ai.emergencyClose(); @@ -2043,7 +2042,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer stopRedisServer(); // no need to track PR instances since we won't create any more - // bridgeServers or gatewayHubs + // cacheServers or gatewayHubs if (this.partitionedRegions != null) { if (isDebugEnabled) { logger.debug("{}: clearing partitioned regions...", this); @@ -2615,12 +2614,12 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer final boolean isDebugEnabled = logger.isDebugEnabled(); if (isDebugEnabled) { - logger.debug("{}: stopping bridge servers...", this); + logger.debug("{}: stopping cache servers...", this); } - boolean stoppedBridgeServer = false; - Iterator allBridgeServersIterator = this.allBridgeServers.iterator(); - while (allBridgeServersIterator.hasNext()) { - BridgeServerImpl bridge = (BridgeServerImpl) allBridgeServersIterator.next(); + boolean stoppedCacheServer = false; + Iterator allCacheServersIterator = this.allCacheServers.iterator(); + while (allCacheServersIterator.hasNext()) { + BridgeServerImpl bridge = (BridgeServerImpl) allCacheServersIterator.next(); if (isDebugEnabled) { logger.debug("stopping bridge {}", bridge); } @@ -2631,11 +2630,11 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer logger.debug("Ignored cache closure while closing bridge {}", bridge, e); } } - allBridgeServers.remove(bridge); - stoppedBridgeServer = true; + allCacheServers.remove(bridge); + stoppedCacheServer = true; } - if (stoppedBridgeServer) { - // now that all the bridge servers have stopped empty the static pool of commBuffers it might have used. + if (stoppedCacheServer) { + // now that all the cache servers have stopped empty the static pool of commBuffers it might have used. ServerConnection.emptyCommBufferPool(); } @@ -3783,10 +3782,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer return this.eventThreadPool; } - public BridgeServer addBridgeServer() { - return (BridgeServer) addCacheServer(); - } - public CacheServer addCacheServer() { return addCacheServer(false); } @@ -3798,7 +3793,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer stopper.checkCancelInProgress(null); BridgeServerImpl bridge = new BridgeServerImpl(this, isGatewayReceiver); - allBridgeServers.add(bridge); + allCacheServers.add(bridge); sendAddCacheServerProfileMessage(); return bridge; @@ -3971,33 +3966,29 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer } } - public List getBridgeServers() { - return getCacheServers(); - } - public List getCacheServers() { - List bridgeServersWithoutReceiver = null; - if (!allBridgeServers.isEmpty()) { - Iterator allBridgeServersIterator = allBridgeServers.iterator(); - while (allBridgeServersIterator.hasNext()) { - BridgeServerImpl bridgeServer = (BridgeServerImpl) allBridgeServersIterator.next(); - // If BridgeServer is a GatewayReceiver, don't return as part of CacheServers - if (!bridgeServer.isGatewayReceiver()) { - if (bridgeServersWithoutReceiver == null) { - bridgeServersWithoutReceiver = new ArrayList(); + List cacheServersWithoutReceiver = null; + if (!allCacheServers.isEmpty()) { + Iterator allCacheServersIterator = allCacheServers.iterator(); + while (allCacheServersIterator.hasNext()) { + BridgeServerImpl cacheServer = (BridgeServerImpl) allCacheServersIterator.next(); + // If CacheServer is a GatewayReceiver, don't return as part of CacheServers + if (!cacheServer.isGatewayReceiver()) { + if (cacheServersWithoutReceiver == null) { + cacheServersWithoutReceiver = new ArrayList(); } - bridgeServersWithoutReceiver.add(bridgeServer); + cacheServersWithoutReceiver.add(cacheServer); } } } - if (bridgeServersWithoutReceiver == null) { - bridgeServersWithoutReceiver = Collections.emptyList(); + if (cacheServersWithoutReceiver == null) { + cacheServersWithoutReceiver = Collections.emptyList(); } - return bridgeServersWithoutReceiver; + return cacheServersWithoutReceiver; } - public List getBridgeServersAndGatewayReceiver() { - return allBridgeServers; + public List getCacheServersAndGatewayReceiver() { + return allCacheServers; } /** @@ -4125,9 +4116,9 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer boolean hasSerialSenders = hasSerialSenders(r); boolean result = hasSerialSenders; if (!result) { - Iterator allBridgeServersIterator = allBridgeServers.iterator(); - while (allBridgeServersIterator.hasNext()) { - BridgeServerImpl server = (BridgeServerImpl) allBridgeServersIterator.next(); + Iterator allCacheServersIterator = allCacheServers.iterator(); + while (allCacheServersIterator.hasNext()) { + BridgeServerImpl server = (BridgeServerImpl) allCacheServersIterator.next(); if (!server.getNotifyBySubscription()) { result = true; break; @@ -4181,7 +4172,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer stopper.checkCancelInProgress(null); if (!this.isServer) { - return (this.allBridgeServers.size() > 0); + return (this.allCacheServers.size() > 0); } else { return true; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java index acafd6d..9432b13 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GridAdvisor.java @@ -327,7 +327,7 @@ public abstract class GridAdvisor extends DistributionAdvisor { boolean exchangeProfiles, final List<Profile> replyProfiles) { final GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); if (cache != null && !cache.isClosed()) { - List<?> bridgeServers = cache.getBridgeServersAndGatewayReceiver(); + List<?> bridgeServers = cache.getCacheServersAndGatewayReceiver(); for (int i = 0; i < bridgeServers.size(); i++) { BridgeServerImpl bsi = (BridgeServerImpl)bridgeServers.get(i); if (bsi.isRunning()) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java index 7654f6f..54160be 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java @@ -11294,7 +11294,7 @@ public class LocalRegion extends AbstractRegion */ protected boolean shouldNotifyBridgeClients() { - return (this.cache.getBridgeServers().size() > 0) + return (this.cache.getCacheServers().size() > 0) && !this.isUsedForPartitionedRegionAdmin && !this.isUsedForPartitionedRegionBucket && !this.isUsedForMetaRegion; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java index f5cf679..3a436c4 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java @@ -3013,7 +3013,7 @@ protected boolean checkEventForRemoval(Long counter, ThreadIdentifier threadid, && !queueRemovalMessageList.isEmpty()) { // messages exist QueueRemovalMessage qrm = new QueueRemovalMessage(); qrm.resetRecipients(); - List<BridgeServerImpl> servers = this.cache.getBridgeServers(); + List<BridgeServerImpl> servers = this.cache.getCacheServers(); List<DistributedMember> recipients = new LinkedList(); for (BridgeServerImpl server: servers) { recipients.addAll(server.getCacheServerAdvisor().adviseBridgeServers()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/InternalBridgeMembership.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/InternalBridgeMembership.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/InternalBridgeMembership.java index b0dc18f..ec96b89 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/InternalBridgeMembership.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/InternalBridgeMembership.java @@ -283,7 +283,7 @@ public final class InternalBridgeMembership { if(onlyClientsNotifiedByThisServer) { // Note it is not necessary to synchronize on the list of bridge servers here, // since this is only a status (snapshot) of the system. - for (Iterator bsii = CacheFactory.getAnyInstance().getBridgeServers().iterator(); bsii.hasNext(); ) { + for (Iterator bsii = CacheFactory.getAnyInstance().getCacheServers().iterator(); bsii.hasNext(); ) { BridgeServerImpl bsi = (BridgeServerImpl) bsii.next(); AcceptorImpl ai = bsi.getAcceptor(); if (ai != null && ai.getCacheClientNotifier() != null) { @@ -338,7 +338,7 @@ public final class InternalBridgeMembership { // Get all clients Map allClients = new HashMap(); - for (Iterator bsii = CacheFactory.getAnyInstance().getBridgeServers().iterator(); bsii.hasNext(); ) { + for (Iterator bsii = CacheFactory.getAnyInstance().getCacheServers().iterator(); bsii.hasNext(); ) { BridgeServerImpl bsi = (BridgeServerImpl) bsii.next(); AcceptorImpl ai = bsi.getAcceptor(); if (ai != null && ai.getCacheClientNotifier() != null) { @@ -359,7 +359,7 @@ public final class InternalBridgeMembership { if (c==null) // Add a NULL Check return clientQueueSizes; - for (Iterator bsii = c.getBridgeServers().iterator(); bsii.hasNext(); ) { + for (Iterator bsii = c.getCacheServers().iterator(); bsii.hasNext(); ) { BridgeServerImpl bsi = (BridgeServerImpl) bsii.next(); AcceptorImpl ai = bsi.getAcceptor(); if (ai != null && ai.getCacheClientNotifier() != null) { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java index aac9176..c260456 100755 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java @@ -58,7 +58,7 @@ import com.gemstone.gemfire.ToDataException; import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.RegionDestroyedException; import com.gemstone.gemfire.cache.client.internal.PoolImpl; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.wan.GatewayTransportFilter; import com.gemstone.gemfire.distributed.internal.DM; import com.gemstone.gemfire.distributed.internal.DistributionConfig; @@ -328,7 +328,7 @@ public class AcceptorImpl extends Acceptor implements Runnable } { int tmp_maxThreads = maxThreads; - if (maxThreads == BridgeServer.DEFAULT_MAX_THREADS) { + if (maxThreads == CacheServer.DEFAULT_MAX_THREADS) { // consult system properties for 5.0.2 backwards compatibility if (DEPRECATED_SELECTOR) { tmp_maxThreads = DEPRECATED_SELECTOR_POOL_SIZE; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java index a394a90..6505fb3 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java @@ -73,7 +73,6 @@ import com.gemstone.gemfire.cache.query.RegionNotFoundException; import com.gemstone.gemfire.cache.query.internal.cq.CqService; import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.snapshot.CacheSnapshotService; -import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.cache.util.GatewayConflictResolver; import com.gemstone.gemfire.cache.wan.GatewayReceiver; import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory; @@ -981,11 +980,6 @@ public class CacheCreation implements InternalCache, Extensible<Cache> { return (Region)this.roots.get(path); } - @SuppressWarnings("deprecation") - public BridgeServer addBridgeServer() { - return (BridgeServer)addCacheServer(); - } - public CacheServer addCacheServer() { return addCacheServer(false); } @@ -1000,9 +994,6 @@ public class CacheCreation implements InternalCache, Extensible<Cache> { this.declarablePropertiesMap.put(declarable, properties); } - public List getBridgeServers() { - return getCacheServers(); - } public List getCacheServers() { return this.bridgeServers; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/ClientCacheCreation.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/ClientCacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/ClientCacheCreation.java index d12e8ce..83b3ece 100644 --- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/ClientCacheCreation.java +++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/ClientCacheCreation.java @@ -28,7 +28,6 @@ import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.PoolManager; import com.gemstone.gemfire.cache.client.internal.PoolImpl; import com.gemstone.gemfire.cache.server.CacheServer; -import com.gemstone.gemfire.cache.util.BridgeServer; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl; import com.gemstone.gemfire.internal.cache.PoolFactoryImpl; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; @@ -145,10 +144,6 @@ public class ClientCacheCreation extends CacheCreation implements ClientCache { } @Override - public BridgeServer addBridgeServer() { - throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString()); - } - @Override public CacheServer addCacheServer() { throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java index ec8fb09..336dfd3 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java @@ -14,7 +14,7 @@ import junit.framework.Assert; import com.gemstone.gemfire.cache.client.PoolFactory; import com.gemstone.gemfire.cache.client.PoolManager; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache.util.CacheWriterAdapter; import com.gemstone.gemfire.cache30.CacheTestCase; import com.gemstone.gemfire.internal.AvailablePort; @@ -394,7 +394,7 @@ public class ConnectionPoolAndLoaderDUnitTest extends CacheTestCase { throws IOException { Cache cache = getCache(); - BridgeServer bridge = cache.addBridgeServer(); + CacheServer bridge = cache.addCacheServer(); bridge.setPort(port); bridge.setNotifyBySubscription(notifyBySubscription); bridge.start(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceDUnitTest.java index 1fdb67c..8b2cf0b 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceDUnitTest.java @@ -269,7 +269,7 @@ public class AutoConnectionSourceDUnitTest extends LocatorTestBase { final String locators = getServerHostName(vm0.getHost()) + "[" + locatorPort + "]"; final int serverPort1 =startBridgeServerInVM(vm1, new String[] {"group1"}, locators); - final int serverPort2 =addBridgeServerInVM(vm1, new String[] {"group2"}); + final int serverPort2 =addCacheServerInVM(vm1, new String[] {"group2"}); startBridgeClientInVM(vm2, "group2", getServerHostName(vm0.getHost()), locatorPort); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java index 8509c54..9f1d67a 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceWithUDPDUnitTest.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.cache.CacheFactory; import com.gemstone.gemfire.cache.DataPolicy; import com.gemstone.gemfire.cache.RegionAttributes; import com.gemstone.gemfire.cache.Scope; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.Locator; import com.gemstone.gemfire.distributed.internal.DistributionConfig; @@ -90,7 +90,7 @@ public class AutoConnectionSourceWithUDPDUnitTest extends for(int i = 0; i < regions.length; i++) { cache.createRegion(regions[i], attrs); } - BridgeServer server = cache.addBridgeServer(); + CacheServer server = cache.addCacheServer(); final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(serverPort); server.setGroups(groups); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java index 12878a8..dcede9b 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java @@ -24,7 +24,7 @@ import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.PoolFactory; import com.gemstone.gemfire.cache.client.PoolManager; import com.gemstone.gemfire.cache.client.ServerConnectivityException; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.internal.ServerLocation; import com.gemstone.gemfire.internal.AvailablePort; @@ -155,8 +155,8 @@ public class ConnectionPoolImplJUnitTest { @Test public void testExecuteOp() throws Exception { - BridgeServer server1 = cache.addBridgeServer(); - BridgeServer server2 = cache.addBridgeServer(); + CacheServer server1 = cache.addCacheServer(); + CacheServer server2 = cache.addCacheServer(); int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2); int port1 = ports[0]; int port2 = ports[1]; @@ -220,7 +220,7 @@ public class ConnectionPoolImplJUnitTest { @Test public void testCreatePool() throws Exception { - BridgeServer server1 = cache.addBridgeServer(); + CacheServer server1 = cache.addCacheServer(); int port1 = port; server1.setPort(port1); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java index dffc216..31c63dc 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorLoadBalancingDUnitTest.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionRespons import com.gemstone.gemfire.cache.server.ServerLoad; import com.gemstone.gemfire.cache.server.ServerLoadProbeAdapter; import com.gemstone.gemfire.cache.server.ServerMetrics; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.Locator; import com.gemstone.gemfire.distributed.internal.InternalLocator; import com.gemstone.gemfire.distributed.internal.ServerLocation; @@ -242,7 +242,7 @@ public class LocatorLoadBalancingDUnitTest extends LocatorTestBase { public void run() { Cache cache = (Cache) remoteObjects.get(CACHE_KEY); final BridgeServerImpl server = (BridgeServerImpl) - cache.getBridgeServers().get(0); + cache.getCacheServers().get(0); WaitCriterion wc = new WaitCriterion() { String excuse; public boolean done() { @@ -456,7 +456,7 @@ public class LocatorLoadBalancingDUnitTest extends LocatorTestBase { public void run() { Cache cache = (Cache) remoteObjects.get(CACHE_KEY); - BridgeServer server = (BridgeServer) cache.getBridgeServers().get(0); + CacheServer server = (CacheServer) cache.getCacheServers().get(0); MyLoadProbe probe = (MyLoadProbe) server.getLoadProbe(); probe.setLoad(newLoad); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java index 0776112..01a9c19 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java @@ -27,7 +27,7 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.PoolManager; import com.gemstone.gemfire.cache.server.ServerLoadProbe; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.Locator; import com.gemstone.gemfire.distributed.internal.DistributionConfig; @@ -135,13 +135,13 @@ public abstract class LocatorTestBase extends DistributedTestCase { return startBridgeServerInVM(vm, groups, locators, new String[] {REGION_NAME}); } - protected int addBridgeServerInVM(VM vm, final String[] groups) { + protected int addCacheServerInVM(VM vm, final String[] groups) { SerializableCallable connect = new SerializableCallable("Add Bridge server") { public Object call() throws Exception { Cache cache = (Cache) remoteObjects.get(CACHE_KEY); - BridgeServer server = cache.addBridgeServer(); + CacheServer server = cache.addCacheServer(); final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(serverPort); server.setGroups(groups); @@ -154,7 +154,7 @@ public abstract class LocatorTestBase extends DistributedTestCase { } protected int startBridgeServerInVM(VM vm, final String[] groups, final String locators, final String[] regions) { - return startBridgeServerInVM(vm, groups, locators, regions, BridgeServer.DEFAULT_LOAD_PROBE); + return startBridgeServerInVM(vm, groups, locators, regions, CacheServer.DEFAULT_LOAD_PROBE); } protected int startBridgeServerInVM(VM vm, final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe) { @@ -174,7 +174,7 @@ public abstract class LocatorTestBase extends DistributedTestCase { for(int i = 0; i < regions.length; i++) { cache.createRegion(regions[i], attrs); } - BridgeServer server = cache.addBridgeServer(); + CacheServer server = cache.addCacheServer(); final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort(); server.setPort(serverPort); server.setGroups(groups); @@ -208,7 +208,7 @@ public abstract class LocatorTestBase extends DistributedTestCase { for(int i = 0; i < regions.length; i++) { cache.createRegion(regions[i], attrs); } - BridgeServer server = cache.addBridgeServer(); + CacheServer server = cache.addCacheServer(); server.setGroups(groups); server.setLoadProbe(probe); final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java index 0e982bf..769ec83 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java @@ -32,7 +32,7 @@ import com.gemstone.gemfire.cache.query.internal.DefaultQuery; import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter; import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder; import com.gemstone.gemfire.cache.query.types.ObjectType; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache30.BridgeTestCase; import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.cache30.CacheTestCase; @@ -2421,7 +2421,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase { throws IOException { Cache cache = getCache(); - BridgeServer bridge = cache.addBridgeServer(); + CacheServer bridge = cache.addCacheServer(); bridge.setPort(port); bridge.setNotifyBySubscription(notifyBySubscription); bridge.start(); @@ -2432,8 +2432,8 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase { * Stops the bridge server that serves up the given cache. */ protected void stopBridgeServer(Cache cache) { - BridgeServer bridge = - (BridgeServer) cache.getBridgeServers().iterator().next(); + CacheServer bridge = + (CacheServer) cache.getCacheServers().iterator().next(); bridge.stop(); assertFalse(bridge.isRunning()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java index f2681d2..03c7316 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java @@ -13,7 +13,7 @@ import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.cache.client.PoolManager; import com.gemstone.gemfire.cache.query.*; import com.gemstone.gemfire.cache.query.internal.*; -import com.gemstone.gemfire.cache.util.*; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache30.BridgeTestCase; import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.cache30.CacheTestCase; @@ -1348,7 +1348,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase { throws IOException { Cache cache = getCache(); - BridgeServer bridge = cache.addBridgeServer(); + CacheServer bridge = cache.addCacheServer(); bridge.setPort(port); bridge.setNotifyBySubscription(notifyBySubscription); bridge.start(); @@ -1359,8 +1359,8 @@ public class RemoteQueryDUnitTest extends CacheTestCase { * Stops the bridge server that serves up the given cache. */ protected void stopBridgeServer(Cache cache) { - BridgeServer bridge = - (BridgeServer) cache.getBridgeServers().iterator().next(); + CacheServer bridge = + (CacheServer) cache.getCacheServers().iterator().next(); bridge.stop(); assertFalse(bridge.isRunning()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java index 24f6d64..0ff36c1 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java @@ -31,7 +31,7 @@ import com.gemstone.gemfire.cache.query.data.Portfolio; import com.gemstone.gemfire.cache.query.data.PortfolioData; import com.gemstone.gemfire.cache.query.internal.index.IndexManager.TestHook; import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.cache30.CacheSerializableRunnable; import com.gemstone.gemfire.cache30.CacheTestCase; import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl; @@ -200,7 +200,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase Region partitionRegion = null; IndexManager.testHook = null; try { - BridgeServer bridge = cache.addBridgeServer(); + CacheServer bridge = cache.addCacheServer(); bridge.setPort(0); bridge.start(); bridgeServerPort = bridge.getPort(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeTestCase.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeTestCase.java index bf2da1e..5d73738 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeTestCase.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeTestCase.java @@ -21,7 +21,7 @@ import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.PoolFactory; import com.gemstone.gemfire.cache.client.PoolManager; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem; @@ -69,7 +69,7 @@ public class BridgeTestCase extends CacheTestCase { throws IOException { Cache cache = getCache(); - BridgeServer bridge = cache.addBridgeServer(); + CacheServer bridge = cache.addCacheServer(); bridge.setPort(port); bridge.setMaxThreads(getMaxThreads()); bridge.start(); @@ -90,9 +90,9 @@ public class BridgeTestCase extends CacheTestCase { * @since 4.0 */ public void stopBridgeServers(Cache cache) { - BridgeServer bridge = null; - for (Iterator bsI = cache.getBridgeServers().iterator();bsI.hasNext(); ) { - bridge = (BridgeServer) bsI.next(); + CacheServer bridge = null; + for (Iterator bsI = cache.getCacheServers().iterator();bsI.hasNext(); ) { + bridge = (CacheServer) bsI.next(); bridge.stop(); assertFalse(bridge.isRunning()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java index 487434b..977e4e2 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java @@ -178,7 +178,7 @@ public class Bug38741DUnitTest extends BridgeTestCase { public void run2() throws CacheException { Region r = getRootRegion(rName); BridgeServerImpl bsi = (BridgeServerImpl) - getCache().getBridgeServers().iterator().next(); + getCache().getCacheServers().iterator().next(); Collection cp = bsi.getAcceptor().getCacheClientNotifier().getClientProxies(); // Should only be one because only one client is connected assertEquals(1, cp.size()); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java index 686a0ab..acaf91a 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java @@ -8,7 +8,7 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.internal.AvailablePortHelper; import com.gemstone.gemfire.internal.cache.xmlcache.*; @@ -56,9 +56,9 @@ public class CacheXml40DUnitTest extends CacheXml30DUnitTest { public void testBridgeServers() { CacheCreation cache = new CacheCreation(); - BridgeServer bridge1 = cache.addBridgeServer(); + CacheServer bridge1 = cache.addCacheServer(); setBridgeAttributes(bridge1); - BridgeServer bridge2 = cache.addBridgeServer(); + CacheServer bridge2 = cache.addCacheServer(); bridge2.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); testXml(cache); @@ -68,7 +68,7 @@ public class CacheXml40DUnitTest extends CacheXml30DUnitTest { * Used by testBridgeServers to set version specific attributes * @param bridge1 the bridge server to set attributes upon */ - public void setBridgeAttributes(BridgeServer bridge1) + public void setBridgeAttributes(CacheServer bridge1) { bridge1.setPort(AvailablePortHelper.getRandomAvailableTCPPort()); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java index 96cbb4a..cd16cac 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java @@ -8,8 +8,9 @@ package com.gemstone.gemfire.cache30; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.internal.cache.xmlcache.*; + import java.io.*; import org.xml.sax.SAXException; @@ -40,7 +41,7 @@ public class CacheXml41DUnitTest extends CacheXml40DUnitTest // ////// Test methods - public void setBridgeAttributes(BridgeServer bridge1) + public void setBridgeAttributes(CacheServer bridge1) { super.setBridgeAttributes(bridge1); bridge1.setMaximumTimeBetweenPings(12345); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3eaf0e94/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java ---------------------------------------------------------------------- diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java index bc41df8..9891e59 100644 --- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java +++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java @@ -9,7 +9,7 @@ package com.gemstone.gemfire.cache30; import com.company.app.DBLoader; import com.gemstone.gemfire.cache.*; -import com.gemstone.gemfire.cache.util.BridgeServer; +import com.gemstone.gemfire.cache.server.CacheServer; import com.gemstone.gemfire.internal.AvailablePort; import com.gemstone.gemfire.internal.cache.DistributedRegion; import com.gemstone.gemfire.internal.cache.xmlcache.*; @@ -46,7 +46,7 @@ public class CacheXml45DUnitTest extends CacheXml41DUnitTest { - public void setBridgeAttributes(BridgeServer bridge1) + public void setBridgeAttributes(CacheServer bridge1) { super.setBridgeAttributes(bridge1); bridge1.setMaxConnections(100);