Package org.jboss.cache.lock

Source Code of org.jboss.cache.lock.LockStrategyNone

/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.cache.lock;

import EDU.oswego.cs.dl.util.concurrent.NullSync;
import EDU.oswego.cs.dl.util.concurrent.Sync;

/**
* Transaction isolation level of None.
*
* @author Lari Hotari
* @version $Revision: 2073 $
*/
public class LockStrategyNone implements LockStrategy
{
   private NullSync nullLock_;

   public LockStrategyNone()
   {
      nullLock_ = new NullSync();
   }

   /**
    * @see org.jboss.cache.lock.LockStrategy#readLock()
    */
   public Sync readLock()
   {
      return nullLock_;
   }

   /**
    * @see org.jboss.cache.lock.LockStrategy#upgradeLockAttempt(long)
    */
   public Sync upgradeLockAttempt(long msecs) throws UpgradeException
   {
      return nullLock_;
   }

   /**
    * @see org.jboss.cache.lock.LockStrategy#writeLock()
    */
   public Sync writeLock()
   {
      return nullLock_;
   }
}
TOP

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

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.