/** * @return {@code true} If it is possible to proceed the update operation. */ public boolean tryBeginUpdate() { return sync.tryAcquireForUpdate(); }
/** * Must be called before update begin. */ public void beginUpdate() { Sync<X> sync0; while (!(sync0 = sync).tryAcquireForUpdate()) sync0.awaitResult(); }
/** * @return {@code true} If it is possible to proceed the update operation. */ public boolean tryBeginUpdate() { return sync.tryAcquireForUpdate(); }
/** * Must be called before update begin. */ public void beginUpdate() { Sync<X> sync0; while (!(sync0 = sync).tryAcquireForUpdate()) sync0.awaitResult(); }