Package org.exist.storage.lock

Examples of org.exist.storage.lock.Lock.acquire()


    {
        final int  collectionId = document.getCollection().getId();
        final Lock lock         = dbValues.getLock();

        try {
            lock.acquire( Lock.WRITE_LOCK );

            for( int section = 0; section <= IDX_QNAME; section++ ) {

                for( final Map.Entry<Object, List<NodeId>> entry : pending[section].entrySet() ) {
                    final Object    key   = entry.getKey();
View Full Code Here


            watchDog.proceed(null);

            if( qnames == null ) {

                try {
                    lock.acquire( Lock.READ_LOCK );
                    searchKey = new SimpleValue( collectionId, value );
                    prefixKey = new SimplePrefixValue( collectionId, value.getType() );
                    final IndexQuery query = new IndexQuery( idxOp, searchKey );

                    if( idxOp == IndexQuery.EQ ) {
View Full Code Here

                for( int i = 0; i < qnames.size(); i++ ) {
                    final QName qname = ( QName )qnames.get( i );

                    try {
                        lock.acquire( Lock.READ_LOCK );

                        //Compute a key for the value in the collection
                        searchKey = new QNameValue( collectionId, qname, value, broker.getBrokerPool().getSymbols() );
                        prefixKey = new QNamePrefixValue( collectionId, qname, value.getType(), broker.getBrokerPool().getSymbols() );
View Full Code Here

            watchDog.proceed(null);
            if( qnames == null ) {

                try {
                    lock.acquire( Lock.READ_LOCK );

                    if( startTerm != null ) {

                        //Compute a key for the start term in the collection
                        searchKey = new SimpleValue( collectionId, startTerm );
View Full Code Here

                for( int i = 0; i < qnames.size(); i++ ) {
                    final QName qname = ( QName )qnames.get( i );

                    try {
                        lock.acquire( Lock.READ_LOCK );

                        if( startTerm != null ) {
                            searchKey = new QNameValue( collectionId, qname, startTerm, broker.getBrokerPool().getSymbols() );
                        } else {
                            LOG.debug( "Searching with QName prefix" );
View Full Code Here

        final Lock              lock       = dbValues.getLock();

        for( final Iterator<Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {

            try {
                lock.acquire( Lock.READ_LOCK );
                final Collection c            = ( Collection )i.next();
                final int        collectionId = c.getId();

                //Compute a key for the start value in the collection
                if( stringType ) {
View Full Code Here

        for( int j = 0; j < qnames.length; j++ ) {

            for( final Iterator<Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {

                try {
                    lock.acquire( Lock.READ_LOCK );
                    final int collectionId = ( ( Collection )i.next() ).getId();

                    //Compute a key for the start value in the collection
                    if( stringType ) {
                        final Value startKey = new QNameValue( collectionId, qnames[j], start, broker.getBrokerPool().getSymbols() );
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.