Package xbird.util.concurrent.lock

Examples of xbird.util.concurrent.lock.ILock.lock()


            return readBlock;
        }

        private int[] getBlock(final int page) {
            final ILock lock = _lock;
            lock.lock();
            try {
                return _pageReadCache.get(page);
            } finally {
                lock.unlock();
            }
View Full Code Here


            }
        }

        private void putBlock(final int page, final int[] b) {
            final ILock lock = _lock;
            lock.lock();
            try {
                _pageReadCache.putIfAbsent(page, b);
            } finally {
                lock.unlock();
            }
View Full Code Here

        final ILock lock = _lock;
        if(_exported && !lock.isLocked()) {
            throw new IllegalStateException("ThreadVariable#" + getName()
                    + " should not called by this thread: " + Thread.currentThread().getName());
        }
        lock.lock();
        try {
            if(_catchedException != null) {
                throw _catchedException;
            }
            final Sequence result = _result;
View Full Code Here

            return readBlock;
        }

        private long[] getBlock(final int page) {
            final ILock lock = _lock;
            lock.lock();
            try {
                return _pageReadCache.get(page);
            } finally {
                lock.unlock();
            }
View Full Code Here

            }
        }

        private void putBlock(final int page, final long[] b) {
            final ILock lock = _lock;
            lock.lock();
            try {
                _pageReadCache.putIfAbsent(page, b);
            } finally {
                lock.unlock();
            }
View Full Code Here

            return readBlock;
        }

        private long[] getBlock(final int page) {
            final ILock lock = _lock;
            lock.lock();
            try {
                return _pageReadCache.get(page);
            } finally {
                lock.unlock();
            }
View Full Code Here

            }
        }

        private void putBlock(final int page, final long[] b) {
            final ILock lock = _lock;
            lock.lock();
            try {
                _pageReadCache.putIfAbsent(page, b);
            } finally {
                lock.unlock();
            }
View Full Code Here

            return readBlock;
        }

        private int[] getBlock(final int page) {
            final ILock lock = _lock;
            lock.lock();
            try {
                return _pageReadCache.get(page);
            } finally {
                lock.unlock();
            }
View Full Code Here

            }
        }

        private void putBlock(final int page, final int[] b) {
            final ILock lock = _lock;
            lock.lock();
            try {
                _pageReadCache.putIfAbsent(page, b);
            } finally {
                lock.unlock();
            }
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.