public class StreamLoader extends Task
StreamSaver
.Modifier and Type | Class and Description |
---|---|
protected static class |
StreamLoader.ImportHandler
Handler for various record types in stream being loaded.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
_createMissingTrees |
protected boolean |
_createMissingVolumes |
protected int |
_dataRecordCount |
protected DataInputStream |
_dis |
protected String |
_filePath |
protected StreamLoader.ImportHandler |
_handler |
protected Key |
_key |
protected Exception |
_lastException |
protected Tree |
_lastTree |
protected Volume |
_lastVolume |
protected int |
_otherRecordCount |
protected boolean |
_stop |
protected TreeSelector |
_treeSelector |
protected Value |
_value |
static int |
DEFAULT_BUFFER_SIZE
Default for BufferedInputStream buffer size.
|
_culledMessageCount, _description, _expirationTime, _finishTime, _maxMessageLogSize, _messageLog, _messageLogVerbosity, _messageWriter, _owner, _persistit, _startTime, _state, _suspend, _suspendedDuration, _taskId, _thread, DEFAULT_MAX_MESSAGE_LOG_SIZE, LOG_NORMAL, LOG_VERBOSE, STATE_DONE, STATE_ENDED, STATE_EXPIRED, STATE_FAILED, STATE_NAMES, STATE_NOT_STARTED, STATE_RUNNING, STATE_SUSPENDED
Constructor and Description |
---|
StreamLoader(Persistit persistit,
DataInputStream dis) |
StreamLoader(Persistit persistit,
File file) |
StreamLoader(Persistit persistit,
String fileName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getStatus()
Returns a short String message describing the current state of this
Task . |
void |
load() |
void |
load(StreamLoader.ImportHandler handler) |
void |
load(TreeSelector treeSelector,
boolean createMissingVolumes,
boolean createMissingTrees) |
boolean |
next(StreamLoader.ImportHandler handler) |
void |
runTask()
Called by a newly created
Thread to perform the task. |
appendMessage, cullMessages, endMessage, getMessageLogSize, getMessageLogVerbosity, getMessages, getMessageWriter, getRemainingTime, getStatusDetail, isImmediate, now, parseTreeList, poll, populateTaskStatus, postMessage, resume, run, setMaximumTime, setMessageLogVerbosity, setMessageWriter, setPersistit, setup, start, stop, suspend
public static final int DEFAULT_BUFFER_SIZE
protected String _filePath
protected DataInputStream _dis
protected Key _key
protected Value _value
protected Volume _lastVolume
protected Tree _lastTree
protected int _dataRecordCount
protected int _otherRecordCount
protected boolean _stop
protected Exception _lastException
protected TreeSelector _treeSelector
protected boolean _createMissingVolumes
protected boolean _createMissingTrees
protected StreamLoader.ImportHandler _handler
public StreamLoader(Persistit persistit, DataInputStream dis)
public StreamLoader(Persistit persistit, File file) throws IOException
IOException
public StreamLoader(Persistit persistit, String fileName) throws IOException
IOException
public void close() throws IOException
IOException
public void load() throws IOException, PersistitException
IOException
PersistitException
public void load(TreeSelector treeSelector, boolean createMissingVolumes, boolean createMissingTrees) throws IOException, PersistitException
IOException
PersistitException
public void load(StreamLoader.ImportHandler handler) throws IOException, PersistitException
IOException
PersistitException
public boolean next(StreamLoader.ImportHandler handler) throws IOException, PersistitException
IOException
PersistitException
public void runTask() throws Exception
Task
Thread
to perform the task.Copyright © 2025 Open Identity Platform Community. All rights reserved.