Package org.exist.storage.lock

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


            //} catch (ReadOnlyException e) {
            //LOG.warn(DATABASE_IS_READ_ONLY);
        } catch(final LockException e) {
            LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName());
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    /**
     * get next Free Doc Id
View Full Code Here


            //TODO : rethrow ? -pb
        } catch(final LockException e) {
            LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName(), e);
            //TODO : rethrow ? -pb
        } finally {
            lock.release(Lock.WRITE_LOCK);
        }
        return nextDocId;
    }

    /**
 
View Full Code Here

            btree.rebuild();
            LOG.info("Index " + btree.getFile().getName() + " was rebuilt.");
        } catch(LockException | IOException | TerminatedException | DBException e) {
            LOG.warn("Caught error while rebuilding core index " + btree.getFile().getName() + ": " + e.getMessage(), e);
        } finally {
            lock.release(Lock.WRITE_LOCK);
        }
    }

    @Override
    public void flush() {
View Full Code Here

                    lock.acquire(Lock.WRITE_LOCK);
                    collectionsDb.flush();
                } catch(final LockException e) {
                    LOG.warn("Failed to acquire lock on " + collectionsDb.getFile().getName(), e);
                } finally {
                    lock.release(Lock.WRITE_LOCK);
                }
                notifySync();
                pool.getIndexManager().sync();
                final NumberFormat nf = NumberFormat.getNumberInstance();
                LOG_STATS.info("Memory: " + nf.format(run.totalMemory() / 1024) + "K total; " +
View Full Code Here

        //prepare Trigger
        prepareTrigger(transaction, doc);
      }
      return ql;
      } finally {
          globalLock.release(Lock.READ_LOCK);
      }
  }
 
  protected Sequence deepCopy(Sequence inSeq) throws XPathException {
    context.pushDocumentContext();
View Full Code Here

        catch( final DBException e ) {
            LOG.error( e.getMessage(), e );
            //TODO : throw an exception ? -pb
        }
        finally {
            lock.release( Lock.WRITE_LOCK );
        }
    }


    /* (non-Javadoc)
 
View Full Code Here

                    //Return without clearing the pending entries
                    return;
                }
                finally {
                    lock.release( Lock.WRITE_LOCK );
                    os.clear();
                }
            }
            pending[section].clear();
        }
View Full Code Here

                }
                catch( final IOException e ) {
                    LOG.error( e.getMessage(), e );
                }
                finally {
                    lock.release( Lock.WRITE_LOCK );
                    os.clear();
                }
            }
            pending[section].clear();
        }
View Full Code Here

        }
        catch( final IOException e ) {
            LOG.error( e.getMessage(), e );
        }
        finally {
            lock.release( Lock.WRITE_LOCK );
        }
    }


    /* Drop all index entries for the given document.
View Full Code Here

        catch( final EXistException e ) {
            LOG.warn( "Exception while removing range index: " + e.getMessage(), e );
        }
        finally {
            os.clear();
            lock.release( Lock.WRITE_LOCK );
        }
    }


    public NodeSet find( XQueryWatchDog watchDog, int relation, DocumentSet docs, NodeSet contextSet, int axis, QName qname, Indexable value ) throws TerminatedException
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.