net.sf.jasperreports.engine.fill
public class JRFileVirtualizer extends JRAbstractLRUVirtualizer
JRAbstractLRUVirtualizer.Cache, JRAbstractLRUVirtualizer.CacheReference, JRAbstractLRUVirtualizer.ClassLoaderAnnotationObjectInputStream, JRAbstractLRUVirtualizer.ClassLoaderAnnotationObjectOutputStream
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_TEMP_FILES_SET_DELETE_ON_EXIT
Property used to decide whether
deleteOnExit should be requested
for temporary files created by the virtualizer. |
CLASSLOADER_IDX_NOT_SET, classLoadersIndexes, classLoadersList, lastObject, lastObjectMap, lastObjectSet
Constructor and Description |
---|
JRFileVirtualizer(int maxSize)
Uses the process's working directory as the location to store files.
|
JRFileVirtualizer(int maxSize,
java.lang.String directory) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Called when we are done with the virtualizer and wish to
cleanup any resources it has.
|
protected void |
dispose(java.lang.String virtualId)
Removes the external data associated with a virtualizable object.
|
protected void |
pageIn(JRVirtualizable o)
Reads a virtualizable object's data from an external storage.
|
protected void |
pageOut(JRVirtualizable o)
Writes a virtualizable object's data to an external storage.
|
clearData, deregisterObject, disposeAll, finalize, isAncestorClassLoader, isPagedOut, isPagedOutAndTouch, isReadOnly, isReadOnly, readData, registerObject, requestData, reset, setLastObject, setReadOnly, touch, virtualizeData, writeData
public static final java.lang.String PROPERTY_TEMP_FILES_SET_DELETE_ON_EXIT
deleteOnExit
should be requested
for temporary files created by the virtualizer.
Calling File.deleteOnExit()
will accumulate JVM process memory
(see this bug), and this
should abviously be avoided in long-running applications.
Temporary files will be deleted by explicitly calling cleanup()
or from the virtualizer
finalize()
method.
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 storedprotected void pageOut(JRVirtualizable o) throws java.io.IOException
JRAbstractLRUVirtualizer
pageOut
in class JRAbstractLRUVirtualizer
o
- a virtualizable objectjava.io.IOException
protected void pageIn(JRVirtualizable o) throws java.io.IOException
JRAbstractLRUVirtualizer
pageIn
in class JRAbstractLRUVirtualizer
o
- a virtualizable objectjava.io.IOException
protected void dispose(java.lang.String virtualId)
JRAbstractLRUVirtualizer
dispose
in class JRAbstractLRUVirtualizer
virtualId
- the ID of the virtualizable objectpublic void cleanup()
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com