|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jasperreports.engine.fill.JRFileVirtualizer
public class JRFileVirtualizer
Virtualizes data to the filesystem. When this object is finalized, it removes the swap files it makes. The virtualized objects have references to this object, so finalization does not occur until this object and the objects using it are only weakly referenced.
| Constructor Summary | |
|---|---|
JRFileVirtualizer(int maxSize)
Uses the process's working directory as the location to store files. |
|
JRFileVirtualizer(int maxSize,
java.lang.String directory)
|
|
| Method Summary | |
|---|---|
void |
cleanup()
Called when we are done with the virtualizer and wish to cleanup any resources it has. |
void |
clearData(JRVirtualizable o)
Called when the virtual object paged-out data should be freed. |
void |
deregisterObject(JRVirtualizable o)
Lets this virtualizer know that it no longer must track the object. |
protected void |
finalize()
|
boolean |
isReadOnly()
|
void |
registerObject(JRVirtualizable o)
Lets this virtualizer know that it must track the object. |
void |
requestData(JRVirtualizable o)
Called when the virtual object must be paged-in. |
void |
setReadOnly(boolean ro)
|
void |
touch(JRVirtualizable o)
Lets the virtualizer know that this object is still being used. |
void |
virtualizeData(JRVirtualizable o)
Called when the virtual object should be paged-out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JRFileVirtualizer(int maxSize)
maxSize - the maximum size (in JRVirtualizable objects) of the paged in
cache.
public JRFileVirtualizer(int maxSize,
java.lang.String directory)
maxSize - the maximum size (in JRVirtualizable objects) of the paged in
cache.directory - the base directory in the filesystem where the paged out data
is to be stored| Method Detail |
|---|
public void setReadOnly(boolean ro)
public boolean isReadOnly()
public void registerObject(JRVirtualizable o)
JRVirtualizerAll virtualizable object must register with their virtualizer upon construction.
registerObject in interface JRVirtualizerpublic void deregisterObject(JRVirtualizable o)
JRVirtualizer
deregisterObject in interface JRVirtualizerpublic void touch(JRVirtualizable o)
JRVirtualizerThe virtualizer gets to decide what type of caching strategy it will use.
touch in interface JRVirtualizerpublic void requestData(JRVirtualizable o)
JRVirtualizer
requestData in interface JRVirtualizerpublic void clearData(JRVirtualizable o)
JRVirtualizer
clearData in interface JRVirtualizerpublic void virtualizeData(JRVirtualizable o)
JRVirtualizer
virtualizeData in interface JRVirtualizer
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void cleanup()
cleanup in interface JRVirtualizer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||