Package org.exist.collections

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


                return collection.getSubCollectionEntry(broker, name).getCreated();
            }

        } finally {
            if(collection != null){
                collection.release(Lock.READ_LOCK);
            }
            factory.getBrokerPool().release(broker);
        }  
    }
   
View Full Code Here


                result.put(doc.getFileURI().toString(), tmp);
            }
            return result;
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }

    /**
 
View Full Code Here

            if (collection == null)
                {throw new EXistException("collection " + collUri + " not found");}
            return new Date(collection.getCreationTime());
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }
   
    /**
 
View Full Code Here

                LOG.warn("Child collection '" + childName + "' not found");
            } else {
                try {
                    doCopyCollection(transaction, trigger, child, destCollection, childName);
                } finally {
                    child.release(Lock.WRITE_LOCK);
                }
            }
        }
        saveCollection(transaction, destCollection);
        saveCollection(transaction, destination);
View Full Code Here

            if(parent != null) {
                try {
                    //TODO : resolve URIs
                    parent.removeCollection(this, uri.lastSegment());
                } finally {
                    parent.release(Lock.WRITE_LOCK);
                }
            }

            final Lock lock = collectionsDb.getLock();
            try {
View Full Code Here

                    LOG.warn("Child collection " + childName + " not found");
                } else {
                    try {
                        moveCollectionRecursive(transaction, trigger, child, collection, childName, true);
                    } finally {
                        child.release(Lock.WRITE_LOCK);
                    }
                }
            }
        }
    }
View Full Code Here

            //TODO : exception ? -pb
        } finally {
            //TODO UNDERSTAND : by whom is this lock acquired ? -pb
            // If we don't check for the NO_LOCK we'll pop someone else's lock off
            if(lockMode != Lock.NO_LOCK) {
                collection.release(lockMode);
            }
        }
        return null;
    }
View Full Code Here

                    + "ms.");
            }
            return docs;
        } finally {
            if(rootCollection != null) {
                rootCollection.release(Lock.READ_LOCK);
            }
        }
    }

    //TODO : consider a better cooperation with Collection -pb
View Full Code Here

                LOG.debug("storing XML resource");
                final InputSource inputsource = new InputSource(tmp.toURI().toASCIIString());
                final IndexInfo info = collection.validateXMLResource(txn, broker, documentUri, inputsource);
                final DocumentImpl doc = info.getDocument();
                doc.getMetadata().setMimeType(contentType);
                collection.release(Lock.READ_LOCK);
                collectionLocked = false;
                collection.store(txn, broker, info, inputsource, false);
                LOG.debug("done");
               
            } else {
View Full Code Here

            if (transact != null) {
                transact.close(txn);
            }
            LOG.debug("Done.");
            if(collectionLocked && collection != null){
                collection.release(Lock.READ_LOCK);
            }
           
            pool.release(broker);
        }
       
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.