Search in sources :

Example 1 with LockUncertainException

use of net.sourceforge.processdash.util.lock.LockUncertainException in project processdash by dtuma.

the class ResourceBridgeClient method pingLock.

public synchronized void pingLock() throws LockFailureException {
    if (userName == null)
        throw new NotLockedException();
    ProfTimer pt = new ProfTimer(logger, "ResourceBridgeClient.pingLock[" + remoteUrl + "]");
    try {
        doLockPostRequest(PING_LOCK_ACTION);
        pt.click("Pinged bridged lock");
    } catch (LockFailureException lfe) {
        throw lfe;
    } catch (Exception e) {
        throw new LockUncertainException(e);
    }
}
Also used : ProfTimer(net.sourceforge.processdash.util.ProfTimer) NotLockedException(net.sourceforge.processdash.util.lock.NotLockedException) LockUncertainException(net.sourceforge.processdash.util.lock.LockUncertainException) LockFailureException(net.sourceforge.processdash.util.lock.LockFailureException) LockFailureException(net.sourceforge.processdash.util.lock.LockFailureException) LockUncertainException(net.sourceforge.processdash.util.lock.LockUncertainException) NotLockedException(net.sourceforge.processdash.util.lock.NotLockedException) IOException(java.io.IOException) HttpException(net.sourceforge.processdash.util.HttpException) AlreadyLockedException(net.sourceforge.processdash.util.lock.AlreadyLockedException)

Example 2 with LockUncertainException

use of net.sourceforge.processdash.util.lock.LockUncertainException in project processdash by dtuma.

the class ResourceBridgeClient method doAssertLock.

private synchronized void doAssertLock(String action) throws LockFailureException {
    if (userName == null)
        throw new NotLockedException();
    ProfTimer pt = new ProfTimer(logger, "ResourceBridgeClient." + action + "[" + remoteUrl + "]");
    try {
        doLockPostRequest(action);
        pt.click("Asserted bridged lock");
    } catch (LockFailureException lfe) {
        throw lfe;
    } catch (Exception e) {
        throw new LockUncertainException(e);
    }
}
Also used : ProfTimer(net.sourceforge.processdash.util.ProfTimer) NotLockedException(net.sourceforge.processdash.util.lock.NotLockedException) LockUncertainException(net.sourceforge.processdash.util.lock.LockUncertainException) LockFailureException(net.sourceforge.processdash.util.lock.LockFailureException) LockFailureException(net.sourceforge.processdash.util.lock.LockFailureException) LockUncertainException(net.sourceforge.processdash.util.lock.LockUncertainException) NotLockedException(net.sourceforge.processdash.util.lock.NotLockedException) IOException(java.io.IOException) HttpException(net.sourceforge.processdash.util.HttpException) AlreadyLockedException(net.sourceforge.processdash.util.lock.AlreadyLockedException)

Aggregations

IOException (java.io.IOException)2 HttpException (net.sourceforge.processdash.util.HttpException)2 ProfTimer (net.sourceforge.processdash.util.ProfTimer)2 AlreadyLockedException (net.sourceforge.processdash.util.lock.AlreadyLockedException)2 LockFailureException (net.sourceforge.processdash.util.lock.LockFailureException)2 LockUncertainException (net.sourceforge.processdash.util.lock.LockUncertainException)2 NotLockedException (net.sourceforge.processdash.util.lock.NotLockedException)2