public interface IResourceTuple
Tuple
that expose the Tuple.get(String)
method
but internally contains an optimised implementation to accommodate for very large resources.
If we were to load very large CSV or JSON resource files into plain tuples, the nesting map structure of tuples entail a high memory consumption. Alternative is to use a lzay strategy, encode a more compact format and defer the transformation to real tuple only if there is a match.
This interface is used by the streaming resource loader to signal the loading of new values typically from a remote file so that the resource tuples can prepare to whatever their strategy is.
Modifier and Type | Method and Description |
---|---|
void |
addKeyValue(String k,
Tuple item)
Set or reset a value in a resource tuple
|
Tuple |
onEnd()
This signal tells you the loading of a remote resource is now terminated.
|
default void |
onStart()
This signal is sent right before a new set of values will be uploaded.
|
default void onStart()
void addKeyValue(String k, Tuple item)
k
- item
- Tuple onEnd()
You must return the underlying Tuple resource object.
Copyright © 2022. All rights reserved.