public void Unlock() { if (IsDisposed() || id == null) { return; } try { Zookeeper.Delete(id, -1); } catch (ThreadInterruptedException e) { Thread.CurrentThread.Interrupt(); } catch (KeeperException.NoNodeException e) { //do nothing } catch (KeeperException e) { LOG.Warn("Caught: " + e, e); throw; } finally { OnLockReleased(); id = null; } }
public void Unlock() { if (IsDisposed() || id == null) { return; } try { Zookeeper.Delete(id, -1); } catch (ThreadInterruptedException) { #if NET451 Thread.CurrentThread.Interrupt(); #endif } catch (KeeperException.NoNodeException) { //do nothing } catch (KeeperException e) { LOG.WarnFormat("Caught: {0} {1}", e, e.StackTrace); throw; } finally { OnLockReleased(); id = null; } }
public void Close() { IsOwner = false; Zookeeper.Delete(id, -1); }