Package jersey.repackaged.jsr166e

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


        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            ret = internalContainsAll(c, 0, -1);
        } finally {
            lock.unlockRead(stamp);
        }
        return ret;
    }

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


        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            return internalEquals((List<?>)o, 0, -1);
        } finally {
            lock.unlockRead(stamp);
        }
    }

    public E get(int index) {
        final StampedLock lock = this.lock;
View Full Code Here

                index < count && index >= 0)
                e = (E)items[index];
            else
                oobe = true;
        } finally {
            lock.unlockRead(stamp);
        }
        if (oobe)
            throw new ArrayIndexOutOfBoundsException(index);
        return e;
    }
View Full Code Here

        final StampedLock lock = this.lock;
        long s = lock.readLock();
        try {
            h = internalHashCode(0, -1);
        } finally {
            lock.unlockRead(s);
        }
        return h;
    }

    public int indexOf(Object o) {
View Full Code Here

        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            idx = findFirstIndex(array, o, 0, count);
        } finally {
            lock.unlockRead(stamp);
        }
        return idx;
    }

    public boolean isEmpty() {
View Full Code Here

        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            idx = findLastIndex(array, o, count - 1, 0);
        } finally {
            lock.unlockRead(stamp);
        }
        return idx;
    }

    public ListIterator<E> listIterator() {
View Full Code Here

        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            n = count;
        } finally {
            lock.unlockRead(stamp);
        }
        return n;
    }

    public List<E> subList(int fromIndex, int toIndex) {
View Full Code Here

            long stamp = lock.readLock();
            try {
                if (toIndex <= count)
                    ret = new ReadMostlyVectorSublist<E>(this, fromIndex, ssize);
            } finally {
                lock.unlockRead(stamp);
            }
            if (ret != null)
                return ret;
        }
View Full Code Here

        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            return internalToArray(0, -1);
        } finally {
            lock.unlockRead(stamp);
        }
    }

    public <T> T[] toArray(T[] a) {
        final StampedLock lock = this.lock;
View Full Code Here

        final StampedLock lock = this.lock;
        long stamp = lock.readLock();
        try {
            return internalToArray(a, 0, -1);
        } finally {
            lock.unlockRead(stamp);
        }
    }

    public String toString() {
        final StampedLock lock = this.lock;
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.