railo.runtime
Class PageSourcePool

java.lang.Object
  extended by railo.runtime.PageSourcePool
All Implemented Interfaces:
Serializable, Dumpable, Sizeable

public final class PageSourcePool
extends Object
implements Dumpable, Sizeable

pool to handle pages

See Also:
Serialized Form

Constructor Summary
PageSourcePool()
          constructor of the class
 
Method Summary
 void clear()
           
 void clearPages(ClassLoader cl)
          remove all Page from Pool using this classloader
 void clearUnused(ConfigImpl config)
          clear unused pages from page pool
 boolean exists(Object key)
          returns if page object exists
 int getMaxSize()
           
 PageSource getPageSource(Object key, boolean updateAccesTime)
          return pages matching to key
 boolean isEmpty()
           
 Object[] keys()
           
 boolean remove(Object key)
          removes a page from the page pool
 void setPage(Object key, PageSource ps)
          sts a page object to the page pool
 int size()
           
 long sizeOf()
          return the size of the object
 DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
          method to print out information to a object as HTML
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageSourcePool

public PageSourcePool()
constructor of the class

Method Detail

getPageSource

public PageSource getPageSource(Object key,
                                boolean updateAccesTime)
return pages matching to key

Parameters:
key - key for the page
updateAccesTime - define if do update access time
Returns:
page

setPage

public void setPage(Object key,
                    PageSource ps)
sts a page object to the page pool

Parameters:
key - key reference to store page object
ps - pagesource to store

exists

public boolean exists(Object key)
returns if page object exists

Parameters:
key - key reference to a page object
Returns:
has page object or not

keys

public Object[] keys()
Returns:
returns a array of all keys in the page pool

remove

public boolean remove(Object key)
removes a page from the page pool

Parameters:
key - key reference to page object
Returns:
page object matching to key reference

size

public int size()
Returns:
returns the size of the pool

isEmpty

public boolean isEmpty()
Returns:
returns if pool is empty or not

clearUnused

public void clearUnused(ConfigImpl config)
clear unused pages from page pool


toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties dp)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Returns:
HTML print out

clearPages

public void clearPages(ClassLoader cl)
remove all Page from Pool using this classloader

Parameters:
cl -

clear

public void clear()

getMaxSize

public int getMaxSize()

sizeOf

public long sizeOf()
Description copied from interface: Sizeable
return the size of the object

Specified by:
sizeOf in interface Sizeable
Returns:
size of the object


Copyright © 2012 Railo