/** * Configure. * <p> * jcs.remotecache.serverattributes.ATTRIBUTENAME=ATTRIBUTEVALUE * <p> * @param prop * @return RemoteCacheServerAttributesconfigureRemoteCacheServerAttributes */ protected static RemoteCacheServerAttributes configureRemoteCacheServerAttributes( Properties prop ) { RemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); // configure automatically PropertySetter.setProperties( rcsa, prop, CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + "." ); configureManuallyIfValuesArePresent( prop, rcsa ); return rcsa; }
/** * Configure. * <p> * jcs.remotecache.serverattributes.ATTRIBUTENAME=ATTRIBUTEVALUE * <p> * @param prop * @return RemoteCacheServerAttributesconfigureRemoteCacheServerAttributes */ protected static RemoteCacheServerAttributes configureRemoteCacheServerAttributes( Properties prop ) { RemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); // configure automatically PropertySetter.setProperties( rcsa, prop, CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX + "." ); configureManuallyIfValuesArePresent( prop, rcsa ); return rcsa; }
@Override protected void setUp() throws Exception { super.setUp(); IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" ); this.server = new RemoteCacheServer<String, String>( rcsa ); }
/** * Verify that we get a string, even if not attributes are set. */ public void testToString() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); assertNotNull( "Should have a string.", attributes.toString() ); }
/** * Verify that we get a string, even if not attributes are set. */ public void testToString() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); assertNotNull( "Should have a string.", attributes.toString() ); }
@Override protected void setUp() throws Exception { super.setUp(); IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" ); Properties config = RemoteUtils.loadProps(rcsa.getConfigFileName()); this.server = new RemoteCacheServer<String, String>( rcsa, config ); }
throws Exception IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" );
throws Exception IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" );
/** * Verify that the type is set correctly and that the correct name is returned for the type. */ public void testSetRemoteTypeName_cluster() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); attributes.setRemoteTypeName( "CLUSTER" ); assertEquals( "Wrong type.", RemoteType.CLUSTER, attributes.getRemoteType() ); assertEquals( "Wrong name", "CLUSTER", attributes.getRemoteTypeName() ); } }
/** * Verify that the type is set correctly and that the correct name is returned for the type. */ public void testSetRemoteTypeName_local() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); attributes.setRemoteTypeName( "LOCAL" ); assertEquals( "Wrong type.", RemoteType.LOCAL, attributes.getRemoteType() ); assertEquals( "Wrong name", "LOCAL", attributes.getRemoteTypeName() ); }
/** * Verify that the type is set correctly and that the correct name is returned for the type. */ public void testSetRemoteTypeName_local() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); attributes.setRemoteTypeName( "LOCAL" ); assertEquals( "Wrong type.", RemoteType.LOCAL, attributes.getRemoteType() ); assertEquals( "Wrong name", "LOCAL", attributes.getRemoteTypeName() ); }
/** * Verify that the type is set correctly and that the correct name is returned for the type. */ public void testSetRemoteTypeName_cluster() { RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes(); attributes.setRemoteTypeName( "CLUSTER" ); assertEquals( "Wrong type.", RemoteType.CLUSTER, attributes.getRemoteType() ); assertEquals( "Wrong name", "CLUSTER", attributes.getRemoteTypeName() ); } }
IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setLocalClusterConsistency( true ); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" );
IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setLocalClusterConsistency( true ); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" );