org.ow2.util.pool.impl.enhanced.internal.resizer.api
Interface IResizer<S>

Type Parameters:
S - statistics type
All Known Implementing Classes:
AbstractResizer, AsynchronousResizer, MinMaxExpectedSpareStockerResizer, SharedResizer

public interface IResizer<S>

A pool resizer can only manage one pool.

Author:
Gael Lalire

Method Summary
 void prepareUpdate(S stats)
          Prepare an update (calculate next value of expectedSize).
 void setResizable(IResizable resizable)
          Resizer will call method on it.
 void update()
          This method grant that eventually at least one call will be made to setExpectedSize, with stats calculated by latest call to prepareUpdate.
 

Method Detail

prepareUpdate

void prepareUpdate(S stats)
Prepare an update (calculate next value of expectedSize). When this method returns the calcul must be complete (no asynchronous mechanism can be used).

Parameters:
stats - statistics

update

void update()
This method grant that eventually at least one call will be made to setExpectedSize, with stats calculated by latest call to prepareUpdate. When this method returns you cannot know if the setExpectedSize have been called (asynchronous mechanism like watchDog or delegation to another thread can be used).


setResizable

void setResizable(IResizable resizable)
Resizer will call method on it.

Parameters:
resizable - a resizable


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.