Package org.exist.collections

Examples of org.exist.collections.Collection.release()


        } finally {

            // Clean-up, just in case
            if (collection != null) {
                collection.release(Lock.READ_LOCK);
            }

            // Clean-up, just in case
            if (document != null) {
                document.getUpdateLock().release(Lock.READ_LOCK);
View Full Code Here


        } finally {

            // Clean up collection
            if (collection != null) {
                collection.release(Lock.READ_LOCK);
            }

            // Return broker
            brokerPool.release(broker);
View Full Code Here

            return new ArrayList<>();

        } finally {

            if (collection != null) {
                collection.release(Lock.READ_LOCK);
            }

            brokerPool.release(broker);
        }
View Full Code Here

            return new ArrayList<>();
           
        } finally {
            // Clean up resources
            if (collection != null) {
                collection.release(Lock.READ_LOCK);
            }

            brokerPool.release(broker);
        }
View Full Code Here

        } finally {

            // TODO: check if can be done earlier
            if (collection != null) {
                collection.release(Lock.WRITE_LOCK);
            }

            txnManager.close(txn);
            brokerPool.release(broker);
View Full Code Here

                vtf.delete();
            }

            // TODO: check if can be done earlier
            if (collection != null) {
                collection.release(Lock.WRITE_LOCK);
            }
            txnManager.close(txn);
            brokerPool.release(broker);

            if(LOG.isDebugEnabled())
View Full Code Here

            throw new EXistException(e.getMessage());

        } finally {

            if (destCollection != null) {
                destCollection.release(Lock.WRITE_LOCK);
            }

            if (srcCollection != null) {
                srcCollection.release(Lock.WRITE_LOCK);
            }
View Full Code Here

                    throw new XPathException(this, pde.getMessage(), pde);
                } finally {
                    if (doc != null)
                        doc.getUpdateLock().release(Lock.READ_LOCK);
                    if(collection != null)
                        collection.release(Lock.READ_LOCK);
                }
            } else {
                // first check if the URI points to a registered module
                String location = context.getModuleLocation(uri);
                if (location != null)
View Full Code Here

      System.out.println("Putting documents.");
      DBBroker broker1 = pool1.get(user1);
      Txn transaction1 = pool1.getTransactionManager().beginTransaction();
      Collection top1 = storeBin(broker1,transaction1,"1");
      pool1.getTransactionManager().commit(transaction1);
      top1.release(Lock.READ_LOCK);
      pool1.release(broker1);
     
      DBBroker broker2 = pool2.get(user1);
      Txn transaction2 = pool2.getTransactionManager().beginTransaction();
      Collection top2 = storeBin(broker2,transaction2,"2");
View Full Code Here

     
      DBBroker broker2 = pool2.get(user1);
      Txn transaction2 = pool2.getTransactionManager().beginTransaction();
      Collection top2 = storeBin(broker2,transaction2,"2");
      pool2.getTransactionManager().commit(transaction2);
      top2.release(Lock.READ_LOCK);
      pool2.release(broker2);
   }
  
   public void get()
      throws Exception
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.