anthill.storage
Class CapacityException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--anthill.storage.CapacityException
- All Implemented Interfaces:
- java.io.Serializable
- public class CapacityException
- extends java.lang.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, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 capacityremainingCapacity
- remaining capacityrequestedCapacity
- requested capacity
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.