summaryrefslogtreecommitdiff
path: root/java/test/Freeze/evictor/RemoteEvictorI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Freeze/evictor/RemoteEvictorI.java')
-rw-r--r--java/test/Freeze/evictor/RemoteEvictorI.java108
1 files changed, 54 insertions, 54 deletions
diff --git a/java/test/Freeze/evictor/RemoteEvictorI.java b/java/test/Freeze/evictor/RemoteEvictorI.java
index f17cf467b0c..1aece86c862 100644
--- a/java/test/Freeze/evictor/RemoteEvictorI.java
+++ b/java/test/Freeze/evictor/RemoteEvictorI.java
@@ -14,16 +14,16 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
public void
initialize(Ice.ObjectAdapter adapter, Ice.Identity ident, String facet, Ice.Object servant)
{
- if(facet.length() == 0)
- {
- ServantI servantImpl = (ServantI) ((Test._ServantTie) servant).ice_delegate();
- servantImpl.init(_remoteEvictor, _evictor);
- }
- else
- {
- ServantI servantImpl = (ServantI) ((Test._FacetTie) servant).ice_delegate();
- servantImpl.init(_remoteEvictor, _evictor);
- }
+ if(facet.length() == 0)
+ {
+ ServantI servantImpl = (ServantI) ((Test._ServantTie) servant).ice_delegate();
+ servantImpl.init(_remoteEvictor, _evictor);
+ }
+ else
+ {
+ ServantI servantImpl = (ServantI) ((Test._FacetTie) servant).ice_delegate();
+ servantImpl.init(_remoteEvictor, _evictor);
+ }
}
void init(RemoteEvictorI remoteEvictor, Freeze.Evictor evictor)
@@ -39,19 +39,19 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
RemoteEvictorI(Ice.ObjectAdapter adapter, String envName, String category)
{
- _adapter = adapter;
+ _adapter = adapter;
_category = category;
- //
- // NOTE: COMPILERBUG: The timeout here is required for MacOS X.
- //
- _evictorAdapter = _adapter.getCommunicator().
- createObjectAdapterWithEndpoints(Ice.Util.generateUUID(), "default -t 30000");
+ //
+ // NOTE: COMPILERBUG: The timeout here is required for MacOS X.
+ //
+ _evictorAdapter = _adapter.getCommunicator().
+ createObjectAdapterWithEndpoints(Ice.Util.generateUUID(), "default -t 30000");
- Initializer initializer = new Initializer();
+ Initializer initializer = new Initializer();
- _evictor = Freeze.Util.createEvictor(_evictorAdapter, envName, category, initializer, null, true);
- initializer.init(this, _evictor);
+ _evictor = Freeze.Util.createEvictor(_evictorAdapter, envName, category, initializer, null, true);
+ initializer.init(this, _evictor);
_evictorAdapter.addServantLocator(_evictor, category);
_evictorAdapter.activate();
@@ -65,34 +65,34 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
public Test.ServantPrx
createServant(String id, int value, Ice.Current current)
- throws Test.AlreadyRegisteredException, Test.EvictorDeactivatedException
+ throws Test.AlreadyRegisteredException, Test.EvictorDeactivatedException
{
Ice.Identity ident = new Ice.Identity();
ident.category = _category;
ident.name = id;
- Test._ServantTie tie = new Test._ServantTie();
- tie.ice_delegate(new ServantI(tie, this, _evictor, value));
- try
- {
- return Test.ServantPrxHelper.uncheckedCast(_evictor.add(tie, ident));
- }
- catch(Ice.AlreadyRegisteredException e)
- {
- throw new Test.AlreadyRegisteredException();
- }
- catch(Ice.ObjectAdapterDeactivatedException e)
- {
- throw new Test.EvictorDeactivatedException();
- }
- catch(Freeze.EvictorDeactivatedException e)
- {
- throw new Test.EvictorDeactivatedException();
- }
- catch(Ice.LocalException e)
- {
- System.out.println("Throwing " + e.toString());
- throw e;
- }
+ Test._ServantTie tie = new Test._ServantTie();
+ tie.ice_delegate(new ServantI(tie, this, _evictor, value));
+ try
+ {
+ return Test.ServantPrxHelper.uncheckedCast(_evictor.add(tie, ident));
+ }
+ catch(Ice.AlreadyRegisteredException e)
+ {
+ throw new Test.AlreadyRegisteredException();
+ }
+ catch(Ice.ObjectAdapterDeactivatedException e)
+ {
+ throw new Test.EvictorDeactivatedException();
+ }
+ catch(Freeze.EvictorDeactivatedException e)
+ {
+ throw new Test.EvictorDeactivatedException();
+ }
+ catch(Ice.LocalException e)
+ {
+ System.out.println("Throwing " + e.toString());
+ throw e;
+ }
}
public Test.ServantPrx
@@ -107,7 +107,7 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
public void
saveNow(Ice.Current current)
{
- _evictor.getIterator("", 1);
+ _evictor.getIterator("", 1);
}
public void
@@ -120,17 +120,17 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
public void
destroyAllServants(String facet, Ice.Current current)
{
- //
- // Only for test purpose: don't use such a small value in
- // a real application!
- //
- int batchSize = 2;
+ //
+ // Only for test purpose: don't use such a small value in
+ // a real application!
+ //
+ int batchSize = 2;
- Freeze.EvictorIterator p = _evictor.getIterator(facet, batchSize);
- while(p.hasNext())
- {
- _evictor.remove((Ice.Identity) p.next());
- }
+ Freeze.EvictorIterator p = _evictor.getIterator(facet, batchSize);
+ while(p.hasNext())
+ {
+ _evictor.remove((Ice.Identity) p.next());
+ }
}
private Ice.ObjectAdapter _adapter;