}
public boolean get (IntHolder value, Control control) throws SystemException
{
boolean res = false;
ExplicitInterposition inter = new ExplicitInterposition();
try
{
inter.registerTransaction(control);
}
catch (Exception e)
{
System.err.println("WARNING HammerObject.incr - could not do interposition");
return false;
}
CurrentImple current = OTSImpleManager.current();
try
{
current.begin();
if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
{
value.value = _value;
current.commit(true);
res = true;
}
else
current.rollback();
}
catch (Exception e)
{
System.err.println("HammerObject.get: "+e);
res = false;
}
inter.unregisterTransaction();
return res;
}