public abstract class Page extends Object
It serializes records to byte[]
(in Buffer
) for the following purposes.
(C) and (D) may not be so meaningful as of Embulk v0.7+ (or since earlier) as recent Embulk unlikely
allocates so many Page
s at the same time. Recent Embulk is streaming-driven instead of
multithreaded queue-based.
Page
is NOT for inter-process communication. For multi-process execution such as the deprecated
MapReduce Executor, the executor plugin takes responsibility about interoperable serialization.
Constructor and Description |
---|
Page() |
Modifier and Type | Method and Description |
---|---|
static Page |
allocate(int length)
Deprecated.
It is to be removed, implemented only for compatibility. Plugins should no longer call it directly.
|
abstract Buffer |
buffer() |
abstract JsonValue |
getJsonValueReference(int index)
Returns a JSON value from the JSON value references in this
Page at index . |
abstract String |
getStringReference(int index)
Returns a string from the string references in this
Page at index . |
abstract List<String> |
getStringReferences()
Deprecated.
Do not call this method directly from plugins.
|
abstract ImmutableValue |
getValueReference(int index)
Deprecated.
Use
getJsonValueReference(int) instead. |
abstract List<ImmutableValue> |
getValueReferences()
Deprecated.
Do not call this method directly from plugins.
|
abstract void |
release() |
abstract Page |
setStringReferences(List<String> values)
Deprecated.
Do not call this method directly from plugins.
|
abstract Page |
setValueReferences(List<ImmutableValue> values)
Deprecated.
Do not call this method directly from plugins.
|
static Page |
wrap(Buffer buffer)
Deprecated.
It is to be removed, implemented only for compatibility. Plugins should no longer call it directly.
|
@Deprecated public abstract Page setStringReferences(List<String> values)
Page
.values
- the list of string references to setPage
itself@Deprecated public abstract Page setValueReferences(List<ImmutableValue> values)
Page
in the msgpack-java
representation.
The JSON values are converted to JsonValue
from the msgpack-java
representation.
values
- the list of JSON value references to set in the msgpack-java
representationPage
itself@Deprecated public abstract List<String> getStringReferences()
Page
.Page
@Deprecated public abstract List<ImmutableValue> getValueReferences()
Page
in the msgpack-java
representation.
The JSON values are converted to the msgpack-java
representation from JsonValue
in this Page
.
Page
in the msgpack-java
representationpublic abstract String getStringReference(int index)
Page
at index
.index
- the index of the string reference to returnPage
at index
@Deprecated public abstract ImmutableValue getValueReference(int index)
getJsonValueReference(int)
instead.Page
at index
in the msgpack-java
representation.
The JSON value is converted to the msgpack-java
representatino from JsonValue
in this Page
.
index
- the index of the JSON value reference to returnPage
at index
in the msgpack-java
representationpublic abstract JsonValue getJsonValueReference(int index)
Page
at index
.index
- the index of the JSON value reference to returnPage
at index
public abstract void release()
public abstract Buffer buffer()
@Deprecated public static Page allocate(int length)
Page
instance.@Deprecated public static Page wrap(Buffer buffer)