Package org.exist.storage.lock

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


            NativeStructuralIndex.LOG.warn("Failed to lock structural index: " + e.getMessage(), e);
        } catch (final Exception e) {
            NativeStructuralIndex.LOG.warn("Exception caught while reading structural index for document " +
                doc.getURI() + ": " + e.getMessage(), e);
        } finally {
            lock.release(Lock.WRITE_LOCK);
        }
        return qnames;
    }

    @Override
View Full Code Here


                    NativeStructuralIndex.LOG.warn("Failed to lock structural index: " + e.getMessage(), e);
                } catch (final Exception e) {
                    NativeStructuralIndex.LOG.warn("Exception caught while reading structural index for document " +
                            doc.getURI() + ": " + e.getMessage(), e);
                } finally {
                    lock.release(Lock.READ_LOCK);
                }
            }
        }
        final Occurrences[] result = new Occurrences[occurrences.size()];
        int i = 0;
View Full Code Here

                // } catch (ReadOnlyException e) {
                //    NativeStructuralIndex.LOG.warn("Read-only error: " + e.getMessage(), e);
                } catch (final Exception e) {
                    NativeStructuralIndex.LOG.warn("Exception caught while writing to structural index: " + e.getMessage(), e);
                } finally {
                    lock.release(Lock.WRITE_LOCK);
                }
            }
        } finally {
            pending.clear();
        }
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.exist.storage.ContentLoadingObserver#flush()
View Full Code Here

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

    /* Drop all index entries for the given document.
     * @see org.exist.storage.ContentLoadingObserver#dropIndex(org.exist.dom.DocumentImpl)
View Full Code Here

            } catch (final IOException e) {
                LOG.error(e.getMessage() + " in '" +
                    dbTokens.getFile().getName() + "'", e);
                //TODO : throw exception ? -pb
            } finally {
                lock.release(Lock.READ_LOCK);
            }
        }
        return result;
    }
View Full Code Here

                //TODO : throw exception ? -pb
            } catch (final IOException e) {
                LOG.error(e.getMessage(), e);
              //TODO : throw exception ? -pb
            } finally {
                lock.release(Lock.READ_LOCK);
            }
        }
        return result;
    }
View Full Code Here

                //TODO: throw exception ? -pb
            } catch (final TerminatedException e) {
                LOG.warn(e.getMessage(), e);
                //TODO : throw exception ? -pb
            } finally {
                lock.release(Lock.READ_LOCK);
            }
        }
        return cb.getMatches();
    }
View Full Code Here

                //TODO : throw exception ? -pb
            } catch (final TerminatedException e) {
                LOG.warn(e.getMessage(), e);
                //TODO : throw exception ? -pb
            } finally {
                lock.release(Lock.READ_LOCK);
            }
        }
        final Occurrences[] result = new Occurrences[cb.map.size()];
        return (Occurrences[]) cb.map.values().toArray(result);
    }
View Full Code Here

                    //TODO : throw exception ? -pb
                } catch (final TerminatedException e) {
                    LOG.warn(e.getMessage(), e);
                    //TODO : throw exception ? -pb
                } finally {
                    lock.release(Lock.READ_LOCK);
                }
            }
        }
        final Occurrences[] result = new Occurrences[cb.map.size()];
        return (Occurrences[]) cb.map.values().toArray(result);
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.