Code example for FileLock

Methods: isSharedisValid

0
 
    @Override 
    public String toString() {
        return "Lock{" + 
                "lockName=" + lockName +
                ", isShared=" + (lock == null ? "NULL" : lock.isShared()) +
                ", isValid=" + (lock == null ? "NULL" : lock.isValid()) +
                ", refCount=" + refCount.get() +
                '}'; 
    } 
 
    public synchronized boolean isValid() { 
        return lock != null && lock.isValid();
    } 
 
    synchronized void release() { 
        try { 
            if (isValid()) { 
                lock.release();
                lock = null;
Contextual code suggestions in your IDE  Get Codota for Java