ehcache

net.sf.ehcache.constructs.blocking
Class LockTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.ehcache.CacheException
                  extended by net.sf.ehcache.constructs.blocking.LockTimeoutException
All Implemented Interfaces:
Serializable

public class LockTimeoutException
extends CacheException

Indicates that a timeout has occured while attempting to obtain a lock using ReadWriteLockSync.tryLock(net.sf.ehcache.concurrent.LockType, long)

This is a normal runtime exception which should be handled by calling code. It is possible that simply reattempting to obtain the lock may succeed. Timeouts are often caused by overloaded resources.

The frequency of these Exceptions may be reduced by increasing the timeout if appropriate.

Version:
$Id: LockTimeoutException.java 5594 2012-05-07 16:04:31Z cdennis $
Author:
Greg Luck
See Also:
Serialized Form

Constructor Summary
LockTimeoutException()
          Constructs a new runtime exception with null as its detail message.
LockTimeoutException(String message)
          Constructs a new runtime exception with the specified detail message.
LockTimeoutException(String message, Throwable cause)
          Constructor for the LockTimeoutException object.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockTimeoutException

public LockTimeoutException()
Constructs a new runtime exception with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).


LockTimeoutException

public LockTimeoutException(String message)
Constructs a new runtime exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

LockTimeoutException

public LockTimeoutException(String message,
                            Throwable cause)
Constructor for the LockTimeoutException object.

Parameters:
message - the exception detail message
cause - the cause of the exception

ehcache

Copyright 2001-2016, Terracotta, Inc.