anthill.storage
Class CapacityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--anthill.storage.CapacityException
All Implemented Interfaces:
Serializable

public class CapacityException
extends Exception

Base class for the exceptions thrown by Capacity.

Since:
Capacity 0.1
Author:
Alberto Montresor
See Also:
Serialized Form

Constructor Summary
CapacityException()
          Constructs a CapacityExeception with no detail message.
CapacityException(long capacity, long reaminingCapacity, long requestedCapacity)
          Constructs a CapacityExeception with the specified message.
 
Method Summary
 long getCapacity()
          Returns the initial capacity of the storage which raised this exception.
 long getRemainingCapacity()
          Returns the remaining capacity of the storage which raised this exception.
 long getRequestedCapacity()
          Returns the requested capacity for the resource whose insertion generated this exception.
 
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

CapacityException

public CapacityException()
Constructs a CapacityExeception with no detail message.


CapacityException

public CapacityException(long capacity,
                         long reaminingCapacity,
                         long requestedCapacity)
Constructs a CapacityExeception with the specified message.

Parameters:
capacity - initial capacity
requestedCapacity - requested capacity
Method Detail

getCapacity

public long getCapacity()
Returns the initial capacity of the storage which raised this exception.


getRemainingCapacity

public long getRemainingCapacity()
Returns the remaining capacity of the storage which raised this exception.


getRequestedCapacity

public long getRequestedCapacity()
Returns the requested capacity for the resource whose insertion generated this exception.