Examples of unlockWrite()


Examples of jersey.repackaged.jsr166e.StampedLock.unlockWrite()

                list.rawAddAllAt(index + offset, elements);
                int added = list.count - pc;
                size = s + added;
                return added != 0;
            } finally {
                lock.unlockWrite(stamp);
            }
        }

        public void clear() {
            final StampedLock lock = list.lock;
View Full Code Here

Examples of jersey.repackaged.jsr166e.StampedLock.unlockWrite()

            long stamp = lock.writeLock();
            try {
                list.internalClear(offset, offset + size);
                size = 0;
            } finally {
                lock.unlockWrite(stamp);
            }
        }

        public boolean contains(Object o) {
            return indexOf(o) >= 0;
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

            setTimeAt(entry);
            setValueAt(entry, value);

            unsafe.putAddress(currentPtr, entry);
        } finally {
            lock.unlockWrite();
        }

        count.incrementAndGet();
        return true;
    }
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

                    break;
                }
                currentPtr = entry + NEXT_OFFSET;
            }
        } finally {
            lock.unlockWrite();
        }

        destroyEntry(entry);
        count.decrementAndGet();
        return true;
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

        if (create) {
            return new WritableRecord<K, V>(this, lock, 0, key, currentPtr);
        }

        lock.unlockWrite();
        return null;
    }

    public int entriesToClean() {
        return getCount() - (int) (getCapacity() * (1.0 - cleanupThreshold));
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

                            currentPtr = entry + NEXT_OFFSET;
                        }
                    }
                }
            } finally {
                lock.unlockWrite();
            }
        }

        count.addAndGet(-expired);
        expirations.addAndGet(expired);
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

                        cleared++;
                    }
                    unsafe.putAddress(currentPtr, 0);
                }
            } finally {
                lock.unlockWrite();
            }
        }

        count.addAndGet(-cleared);
    }
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

                    if (record.entry != 0) {
                        currentPtr = record.entry + NEXT_OFFSET;
                    }
                }
            } finally {
                lock.unlockWrite();
            }
        }
    }

    protected long bucketFor(long hashCode) {
View Full Code Here

Examples of one.nio.lock.RWLock.unlockWrite()

            setValueAt(entry, value);

            unsafe.putAddress(currentPtr, entry);
            count.incrementAndGet();
        } finally {
            lock.unlockWrite();
        }
    }

    public boolean putIfAbsent(K key, V value) {
        long hashCode = hashCode(key);
View Full Code Here

Examples of org.geotools.data.shapefile.files.ShpFiles.unlockWrite()

        File file = shpFiles.acquireWriteFile(SHP, this);
        // under windows the two paths can be just different in terms of case..
        assertEquals(new File( path ).getCanonicalPath().toLowerCase(), file.getPath().toLowerCase());
        assertEquals(1, shpFiles.numberOfLocks());
       
        shpFiles.unlockWrite(file, this);
        assertEquals(0, shpFiles.numberOfLocks());
        shpFiles.dispose();
    }

    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.