org.jsmpp.util
Class DumbCapacityPolicy

java.lang.Object
  extended by org.jsmpp.util.DumbCapacityPolicy
All Implemented Interfaces:
CapacityPolicy

public class DumbCapacityPolicy
extends java.lang.Object
implements CapacityPolicy

It's a dumb capacity policy. It calculate nothing, just return the new capacity same as requeiredCapacity.

Author:
uudashr

Constructor Summary
DumbCapacityPolicy()
           
 
Method Summary
 int ensureCapacity(int requiredCapacity, int currentCapacity)
          Ensuring the currentCapacity is save to accommodate new items that totally defined as requiredCapacity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumbCapacityPolicy

public DumbCapacityPolicy()
Method Detail

ensureCapacity

public int ensureCapacity(int requiredCapacity,
                          int currentCapacity)
Description copied from interface: CapacityPolicy
Ensuring the currentCapacity is save to accommodate new items that totally defined as requiredCapacity.

Specified by:
ensureCapacity in interface CapacityPolicy
Parameters:
requiredCapacity - is the required capacity.
currentCapacity - is the current capacity.
Returns:
the new save capacity.