Package org.exist.storage.lock

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


        } catch (BTreeException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } catch (IOException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    /**
     * Completely remove the index identified by its name.
View Full Code Here


        } catch (IOException e) {
            throw new EXistException("Exception caught while deleting sort index: " + e.getMessage(), e);
        } catch (TerminatedException e) {
            throw new EXistException("Exception caught while deleting sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    public void remove(String name, DocumentImpl doc) throws EXistException, LockException {
        short id = getId(name);
View Full Code Here

        } catch (IOException e) {
            throw new EXistException("Exception caught while deleting sort index: " + e.getMessage(), e);
        } catch (TerminatedException e) {
            throw new EXistException("Exception caught while deleting sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    public void remove(DocumentImpl doc) {
        if (index.btree == null)
View Full Code Here

        } catch (LockException e) {
            SortIndex.LOG.debug("Exception caught while reading sort index: " + e.getMessage(), e);
        } catch (EXistException e) {
            SortIndex.LOG.debug("Exception caught while reading sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    /**
     * Register the given index name and return a short id for it.
View Full Code Here

            } catch (BTreeException e) {
                throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
            } catch (TerminatedException e) {
                throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
            } finally {
                lock.release(Lock.READ_LOCK);
            }
        }
        return id;
    }
View Full Code Here

        } catch (BTreeException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } catch (IOException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    private void removeId(String name) throws EXistException {
        byte[] key = new byte[1 + UTF8.encoded(name)];
View Full Code Here

        } catch (BTreeException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } catch (IOException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    private short getId(String name) throws EXistException, LockException {
        byte[] key = new byte[1 + UTF8.encoded(name)];
View Full Code Here

        } catch (BTreeException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } catch (IOException e) {
            throw new EXistException("Exception caught while reading sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.READ_LOCK);
        }
    }

    private byte[] computeKey(short id, NodeProxy proxy) {
        byte[] data = new byte[7 + proxy.getNodeId().size()];
View Full Code Here

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

    @Override
    public void remove() throws DBException {
View Full Code Here

        } catch (BTreeException e) {
            throw new EXistException("Exception caught while creating sort index: " + e.getMessage(), e);
        } catch (IOException e) {
            throw new EXistException("Exception caught while creating sort index: " + e.getMessage(), e);
        } finally {
            lock.release(Lock.WRITE_LOCK);
        }
    }

    public boolean hasIndex(String name) throws EXistException, LockException {
        return getId(name) > 0;
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.