Package org.jitterbit.util

Examples of org.jitterbit.util.LockingFile.acquire()


    @Override
    public boolean lock(String[] args) {
        File file = new File(folder, FILE_NAME);
        LockingFile lock = new LockingFile(file);
        lock.setLogger(logger);
        return lock.acquire();
    }

}
View Full Code Here


        lockFiles = Maps.newIdentityHashMap();
    }

    public synchronized boolean acquire(File location) {
        LockingFile file = new LockingFile(new File(location, FILE_NAME));
        if (file.acquire()) {
            lockFiles.put(location, file);
            return true;
        }
        return false;
    }
View Full Code Here

    }
   
    public synchronized boolean isLocked(File location) {
        LockingFile file = new LockingFile(new File(location, FILE_NAME));
        try {
            if (file.acquire()) {
                return false;
            }
            return true;
        } finally {
            file.release();
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.