/* (non-Javadoc)
* @see org.hornetq.core.persistence.OperationContext#waitCompletion(long)
*/
public boolean waitCompletion(final long timeout) throws Exception
{
SimpleWaitIOCallback waitCallback = new SimpleWaitIOCallback();
executeOnCompletion(waitCallback);
complete();
if (timeout == 0)
{
waitCallback.waitCompletion();
return true;
}
else
{
return waitCallback.waitCompletion(timeout);
}
}