Package org.exist.storage.lock

Examples of org.exist.storage.lock.FileLock


            {journalSizeLimit = sizeOpt.intValue() * 1024 * 1024;}
    }

    public void initialize() throws EXistException, ReadOnlyException {
        final File lck = new File(dir, LCK_FILE);
        fileLock = new FileLock(pool, lck.getAbsolutePath());
        boolean locked = fileLock.tryLock();
        if (!locked) {
            final String lastHeartbeat =
                DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM)
                    .format(fileLock.getLastHeartbeat());
View Full Code Here


            LOG.info("Cannot write to data directory: " + dir.getAbsolutePath() + ". Switching to read-only mode.");
            return false;
        }

        // try to acquire lock on the data dir
        dataLock = new FileLock(this, dir, "dbx_dir.lck");

        try {
            final boolean locked = dataLock.tryLock();
            if(!locked) {
                throw new EXistException("The database directory seems to be locked by another " +
View Full Code Here

TOP

Related Classes of org.exist.storage.lock.FileLock

Copyright © 2018 www.massapicom. 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.