/** * The node ids of memcached nodes, that shall only be used for session * backup by this tomcat/manager, if there are no other memcached nodes * left. Node ids are separated by whitespace or comma. * <p> * E.g. <code>n1 n2</code> * </p> * <p> * When the failover nodes are set when this manager is already initialized, * the new configuration will be loaded. * </p> * * @param failoverNodes * the failoverNodes to set, whitespace or comma separated */ @Override public void setFailoverNodes( final String failoverNodes ) { _msm.setFailoverNodes( failoverNodes ); }
/** * The node ids of memcached nodes, that shall only be used for session * backup by this tomcat/manager, if there are no other memcached nodes * left. Node ids are separated by whitespace or comma. * <p> * E.g. <code>n1 n2</code> * </p> * <p> * When the failover nodes are set when this manager is already initialized, * the new configuration will be loaded. * </p> * * @param failoverNodes * the failoverNodes to set, whitespace or comma separated */ @Override public void setFailoverNodes( final String failoverNodes ) { _msm.setFailoverNodes( failoverNodes ); }
/** * The node ids of memcached nodes, that shall only be used for session * backup by this tomcat/manager, if there are no other memcached nodes * left. Node ids are separated by whitespace or comma. * <p> * E.g. <code>n1 n2</code> * </p> * <p> * When the failover nodes are set when this manager is already initialized, * the new configuration will be loaded. * </p> * * @param failoverNodes * the failoverNodes to set, whitespace or comma separated */ @Override public void setFailoverNodes( final String failoverNodes ) { _msm.setFailoverNodes( failoverNodes ); }
/** * The node ids of memcached nodes, that shall only be used for session * backup by this tomcat/manager, if there are no other memcached nodes * left. Node ids are separated by whitespace or comma. * <p> * E.g. <code>n1 n2</code> * </p> * <p> * When the failover nodes are set when this manager is already initialized, * the new configuration will be loaded. * </p> * * @param failoverNodes * the failoverNodes to set, whitespace or comma separated */ @Override public void setFailoverNodes( final String failoverNodes ) { _msm.setFailoverNodes( failoverNodes ); }
@Test public void testConfigurationFormatFailoverNodesFeature44() throws LifecycleException { _service.setMemcachedNodes( "n1:127.0.0.1:11211 n2:127.0.0.1:11212" ); _service.setFailoverNodes( "n1" ); _service.startInternal(new MemcachedStorageClient(_memcachedMock)); Assert.assertEquals( _service.getFailoverNodeIds(), Arrays.asList( "n1" ) ); _service.setMemcachedNodes( "n1:127.0.0.1:11211 n2:127.0.0.1:11212 n3:127.0.0.1:11213" ); _service.setFailoverNodes( "n1 n2" ); _service.startInternal(new MemcachedStorageClient(_memcachedMock)); Assert.assertEquals( _service.getFailoverNodeIds(), Arrays.asList( "n1", "n2" ) ); _service.setMemcachedNodes( "n1:127.0.0.1:11211 n2:127.0.0.1:11212 n3:127.0.0.1:11213" ); _service.setFailoverNodes( "n1,n2" ); _service.startInternal(new MemcachedStorageClient(_memcachedMock)); Assert.assertEquals( _service.getFailoverNodeIds(), Arrays.asList( "n1", "n2" ) ); }
/** * The node ids of memcached nodes, that shall only be used for session * backup by this tomcat/manager, if there are no other memcached nodes * left. Node ids are separated by whitespace or comma. * <p> * E.g. <code>n1 n2</code> * </p> * <p> * When the failover nodes are set when this manager is already initialized, * the new configuration will be loaded. * </p> * * @param failoverNodes * the failoverNodes to set, whitespace or comma separated */ @Override public void setFailoverNodes( final String failoverNodes ) { _msm.setFailoverNodes( failoverNodes ); }
_tomcat1.getService().setFailoverNodes("n1"); _tomcat2.getService().setMemcachedNodes(memcachedNodes); _tomcat2.getService().setFailoverNodes("n2");