Package org.jboss.cache.lock

Examples of org.jboss.cache.lock.LockManager


    * @throws InterruptedException
    */
   public boolean lock(String name, LockType lockType)
   {

      LockManager lm = ((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(LockManager.class);
      try
      {
         return lm.lock(Fqn.fromRelativeFqn(PARAMETER_ROOT, Fqn.fromString(name)), lockType, Integer.MAX_VALUE);
      }
      catch (InterruptedException e)
      {
         log.warn("An error occurs while tryning to lock the node " + name, e);
      }
View Full Code Here


    * Releases the lock passed in
    * @param name
    */
   public void unlock(String name)
   {
      LockManager lm = ((CacheSPI<Serializable, Object>)cache).getComponentRegistry().getComponent(LockManager.class);
      lm.unlock(Fqn.fromRelativeFqn(PARAMETER_ROOT, Fqn.fromString(name)), cache.getInvocationContext()
         .getGlobalTransaction());
   }
View Full Code Here

TOP

Related Classes of org.jboss.cache.lock.LockManager

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.