|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.data.container.CopyOnAccessTask
final class CopyOnAccessTask
Opens (on demand) a zip file from the workspace location and copies the
binary data content to temp for further reading. This class creates
a Buffer
which reads from the temp file.
Think of this class as an runnable that is executed once on demand. It helps to delay the copy process of the data to speed up the loading of saved workflows.
Constructor Summary | |
---|---|
CopyOnAccessTask(ReferencedFile fileRef,
DataTableSpec spec,
int bufferID,
Map<Integer,ContainerTable> tblRep,
DataContainer.BufferCreator creator)
Keeps reference, nothing else. |
Method Summary | |
---|---|
(package private) Buffer |
createBuffer()
Called to start the copy process. |
(package private) Buffer |
createBuffer(InputStream in)
Called to start the copy process. |
(package private) int |
getBufferID()
Get this buffer's ID. |
(package private) String |
getFileName()
Get name of file to copy from. |
(package private) Map<Integer,ContainerTable> |
getTableRepository()
Get table repository in workflow for blob (de)serialization. |
(package private) void |
setRestoreIntoMemory()
Requests the buffer to read its content into memory once it has been created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
CopyOnAccessTask(ReferencedFile fileRef, DataTableSpec spec, int bufferID, Map<Integer,ContainerTable> tblRep, DataContainer.BufferCreator creator)
fileRef
- To read from.spec
- The spec to the table in file
.bufferID
- The buffer's id used for blob (de)serialization.tblRep
- Repository of tables for blob (de)serialization.creator
- To instantiate the buffer object.Method Detail |
---|
Buffer createBuffer() throws IOException
IOException
- If the file can't be accessed.Buffer createBuffer(InputStream in) throws IOException
in
- To read from, will instantiate a zip input stream on top of
it, which will call close() eventually
IOException
- If the file can't be accessed.String getFileName()
int getBufferID()
void setRestoreIntoMemory()
Map<Integer,ContainerTable> getTableRepository()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |