org.apache.karaf.main
Interface Lock

All Known Implementing Classes:
DefaultJDBCLock, DerbyJDBCLock, MySQLJDBCLock, OracleJDBCLock, SimpleFileLock

public interface Lock


Method Summary
 boolean isAlive()
          Indicates whether or not the lock still exists.
 boolean lock()
          A KeepAlive function to maintain the lock.
 void release()
          Terminate the lock connection safely.
 

Method Detail

lock

boolean lock()
             throws java.lang.Exception
A KeepAlive function to maintain the lock. Indicates whether or not the lock could be aquired.

Returns:
true if connection lock retained, false otherwise.
Throws:
java.lang.Exception

release

void release()
             throws java.lang.Exception
Terminate the lock connection safely.

Throws:
java.lang.Exception

isAlive

boolean isAlive()
                throws java.lang.Exception
Indicates whether or not the lock still exists.

Returns:
true, if the lock still exists, otherwise false.
Throws:
java.lang.Exception


Copyright © 2007-2011 FuseSource, Corp.. All Rights Reserved.