Package jersey.repackaged.jsr166e

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


        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            s.defaultWriteObject();
        } finally {
            lock.unlockRead(stamp);
        }
    }

    static final class Itr<E> implements ListIterator<E>, Enumeration<E> {
        final StampedLock lock;
View Full Code Here


            final StampedLock lock = list.lock;
            long stamp = lock.readLock();
            try {
                return list.internalContainsAll(c, offset, offset + size);
            } finally {
                lock.unlockRead(stamp);
            }
        }

        public boolean equals(Object o) {
            if (o == this)
View Full Code Here

            final StampedLock lock = list.lock;
            long stamp = lock.readLock();
            try {
                return list.internalEquals((List<?>)(o), offset, offset + size);
            } finally {
                lock.unlockRead(stamp);
            }
        }

        public E get(int index) {
            if (index < 0 || index >= size)
View Full Code Here

            final StampedLock lock = list.lock;
            long stamp = lock.readLock();
            try {
                return list.internalHashCode(offset, offset + size);
            } finally {
                lock.unlockRead(stamp);
            }
        }

        public int indexOf(Object o) {
            final StampedLock lock = list.lock;
View Full Code Here

            long stamp = lock.readLock();
            try {
                int idx = findFirstIndex(list.array, o, offset, offset + size);
                return idx < 0 ? -1 : idx - offset;
            } finally {
                lock.unlockRead(stamp);
            }
        }

        public boolean isEmpty() {
            return size() == 0;
View Full Code Here

            long stamp = lock.readLock();
            try {
                int idx = findLastIndex(list.array, o, offset + size - 1, offset);
                return idx < 0 ? -1 : idx - offset;
            } finally {
                lock.unlockRead(stamp);
            }
        }

        public ListIterator<E> listIterator() {
            return new SubItr<E>(this, offset);
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.