private void unsetCurrent() { rwlock.writeLock().lock(); try { SortedBuffer<Integer> tmp = current.getAndSet(null); if (tmp != null) { tmp.clear(); } } finally { rwlock.writeLock().unlock(); } }
private void unsetCurrent() { rwlock.writeLock().lock(); try { SortedBuffer<Integer> tmp = current.getAndSet(null); if (tmp != null) { tmp.clear(); } } finally { rwlock.writeLock().unlock(); } }