Permalink
Browse files

Refactoring RESTClient -> VolDClient

  • Loading branch information...
1 parent 20f80f8 commit f806eaf64b84b522fa79a2489a78a000887eda44 Jörg Bachmann committed Apr 27, 2012
@@ -15,7 +15,7 @@
package de.zib.vold.Test;
-import de.zib.vold.client.RESTClient;
+import de.zib.vold.client.VolDClient;
import de.zib.vold.common.Key;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.context.ApplicationContext;
@@ -44,7 +44,7 @@
private final ApplicationContext context;
- private RESTClient voldClient;
+ private VolDClient voldClient;
Map< Key, Set< String > > keys = new HashMap< Key, Set< String > >();
@@ -60,8 +60,8 @@ public ClientTest( final String serviceUrl, @Optional( "root" ) final String adm
@BeforeClass( groups = { "VoldServiceTest" } )
public void init() {
- voldClient = ( RESTClient )context.getAutowireCapableBeanFactory().createBean(
- RESTClient.class,
+ voldClient = (VolDClient)context.getAutowireCapableBeanFactory().createBean(
+ VolDClient.class,
AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE, true );
voldClient.setBaseURL( baseUrl );
@@ -16,7 +16,7 @@
package de.zib.vold.replication;
-import de.zib.vold.client.RESTClient;
+import de.zib.vold.client.VolDClient;
import de.zib.vold.common.Key;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,22 +41,22 @@
{
protected final Logger log = LoggerFactory.getLogger( this.getClass() );
- RESTClient rest;
+ VolDClient volD;
/**
* Construct an unitialized RESTVoldReplicator.
*/
public RESTVoldReplicator( )
{
- this.rest = new RESTClient();
+ this.volD = new VolDClient();
}
/**
* Set the REST base URL to delegate all write requests to.
*/
public void setBaseURL( String baseURL )
{
- rest.setBaseURL( baseURL );
+ volD.setBaseURL( baseURL );
}
/**
@@ -66,7 +66,7 @@ public void checkState( )
{
try
{
- rest.checkState();
+ volD.checkState();
}
catch( IllegalStateException e )
{
@@ -102,7 +102,7 @@ public void insert( List< String > key, Set< String > value, long timeStamp )
k = Key.buildkey( key );
}
- rest.insert( key.get( 3 ), k, value, timeStamp );
+ volD.insert( key.get( 3 ), k, value, timeStamp );
}
/**
@@ -135,7 +135,7 @@ public void refresh( List< String > key, long timeStamp )
Set< Key > keys = new HashSet< Key >();
keys.add( k );
- rest.refresh( key.get( 3 ), keys, timeStamp );
+ volD.refresh( key.get( 3 ), keys, timeStamp );
}
/**

0 comments on commit f806eaf

Please sign in to comment.