Package org.exist.collections

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


         for (int i=0; i<uris.length; i++) {
            System.out.println(i+": "+uris[i].toString());
         }
         //binDoc = (BinaryDocument)broker.getXMLResource(XmldbURI.create("xmldb:exist:///bin"),Lock.READ_LOCK);
         binDoc = (BinaryDocument)top.getDocument(broker,XmldbURI.create("xmldb:exist:///bin"));
         top.release(Lock.READ_LOCK);
         assertTrue(binDoc!=null);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         broker.readBinaryResource(binDoc,os);
         String comp = os.size()>0 ? new String(os.toByteArray()) : "";
         System.out.println("Got: "+comp);
View Full Code Here


              if (modified != null)
                  {info.getDocument().getMetadata().setLastModified( modified.getTime());}
             
            } finally {
              if (collection != null)
                {collection.release(Lock.WRITE_LOCK);}
            }
           
            collection.store(transaction, broker, info, source, false);
            transact.commit(transaction);
           
View Full Code Here

              {doc.getMetadata().setLastModified(modified.getTime());}
          }

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

        // DWES why seperate store?
        if(treatAsXML){
          collection.store(transaction, broker, info, source, false);
View Full Code Here

                result.addElement(temp);
            }
            return result;
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }
   
    /**
 
View Full Code Here

            final NodeSet nodes = docs.docsToNodeSet();
            final Vector<Vector<Object>> result = scanIndexTerms(start, end, broker, docs, nodes);
            return result;
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }
   
    /**
 
View Full Code Here

            if(doc != null)
                {doc.getUpdateLock().release(Lock.WRITE_LOCK);}
            if(collection != null)
                {collection.release(move ? Lock.WRITE_LOCK : Lock.READ_LOCK);}
            if(destination != null)
                {destination.release(Lock.WRITE_LOCK);}
            transact.close(transaction);
            factory.getBrokerPool().release(broker);
        }
    }
   
View Full Code Here

    } finally {
            transact.close(transaction);
            if(collection != null)
                {collection.release(move ? Lock.WRITE_LOCK : Lock.READ_LOCK);}
            if(destination != null)
                {destination.release(Lock.WRITE_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }
   
    /**
 
View Full Code Here

                  transact.abort(transaction);
                  throw new EXistException("collection " + collUri + " not found!");
              }
            } finally {
              if (collection != null)
                {collection.release(Lock.READ_LOCK);}
            }
            final CollectionConfigurationManager mgr = factory.getBrokerPool().getConfigurationManager();
            mgr.addConfiguration(transaction, broker, collection, configuration);
            transact.commit(transaction);
            LOG.info("Configured '" + collection.getURI() + "'")
View Full Code Here

               
            } while (!ok);
            return id.toString();
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            factory.getBrokerPool().release(broker);
        }
    }
   
    /**
 
View Full Code Here

            return true;
        } catch(final URISyntaxException use) {
            throw new EXistException("Collection '" + collectionUri + "' does not indicate a valid collection URI: " + use.getMessage(), use);
        } finally {
            if(collection != null) {
                collection.release(Lock.READ_LOCK);
            }
            factory.getBrokerPool().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.