@Override public void handleStart(Operation start) { NodeSelectorState state = null; if (!start.hasBody()) { state = new NodeSelectorState(); state.nodeGroupLink = ServiceUriPaths.DEFAULT_NODE_GROUP; } else { state = start.getBody(NodeSelectorState.class); } getHost().getClient().setConnectionLimitPerTag( ServiceClient.CONNECTION_TAG_REPLICATION, NodeSelectorService.REPLICATION_TAG_CONNECTION_LIMIT); getHost().getClient().setConnectionLimitPerTag( ServiceClient.CONNECTION_TAG_SYNCHRONIZATION, NodeSelectorService.SYNCHRONIZATION_TAG_CONNECTION_LIMIT); getHost().getClient().setConnectionLimitPerTag( ServiceClient.CONNECTION_TAG_FORWARDING, FORWARDING_TAG_CONNECTION_LIMIT); state.documentSelfLink = getSelfLink(); state.documentKind = Utils.buildKind(NodeSelectorState.class); state.documentOwner = getHost().getId(); this.cachedState = state; this.replicationUtility = new NodeSelectorReplicationService(this); startHelperServices(start); }
@Test public void testConnectionLimitWithOperationTimeout() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); this.host.connectionTag = "connectionLimitWithOperationTimeoutTag"; this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, ServiceClient.DEFAULT_CONNECTION_LIMIT_PER_HOST); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimitWithOperationTimeout(services); } }
@Test public void testConnectionLimitWithOperationTimeout() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); this.host.connectionTag = "connectionLimitWithOperationTimeoutTag"; this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, ServiceClient.DEFAULT_CONNECTION_LIMIT_PER_HOST); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimitWithOperationTimeout(services); } }
@Test public void testConnectionLimit() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); String tag = "http1.1ConnectionLimitTag"; int limit = 8; ServiceClient serviceClient = createNettyServiceClient(); serviceClient.setConnectionLimitPerTag(tag, limit); serviceClient.start(); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimit(services, serviceClient, tag, limit); } serviceClient.stop(); }
@Test public void testConnectionLimit() throws Throwable { List<Service> services = this.host.doThroughputServiceStart(this.serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), null, null); String tag = "http1.1ConnectionLimitTag"; int limit = 8; ServiceClient serviceClient = createNettyServiceClient(); serviceClient.setConnectionLimitPerTag(tag, limit); serviceClient.start(); for (int i = 0; i < this.iterationCount; i++) { doConnectionLimit(services, serviceClient, tag, limit); } serviceClient.stop(); }
this.host.connectionTag = "http1.1test"; this.host.log("Using tag specific connection limit %d", limit); this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, limit); this.host.doPutPerService( this.requestCount,
this.host.connectionTag = "http1.1test"; this.host.log("Using tag specific connection limit %d", limit); this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, limit); this.host.doPutPerService( this.requestCount,
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1); URI serviceUri = service.getUri(); for (int i = 0; i < count; i++) {
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1); URI serviceUri = service.getUri(); for (int i = 0; i < count; i++) {
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1);
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1);
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1);
this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, 1);
this.host.connectionTag = "http2test"; this.host.log("Using tag specific connection limit %d", limit); this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, limit); this.host.doPutPerService( this.requestCount,
this.host.connectionTag = "http2test"; this.host.log("Using tag specific connection limit %d", limit); this.host.getClient().setConnectionLimitPerTag(this.host.connectionTag, limit); this.host.doPutPerService( this.requestCount,