public class PgxFrameBuilder extends Destroyable
PgxFrame
.Constructor and Description |
---|
PgxFrameBuilder(SessionContext sessionContext, oracle.pgx.api.internal.Core core, java.util.List<ColumnDescriptor> schema, java.util.function.Function<oracle.pgx.api.internal.FrameMetaData,PgxFrame> buildCallback)
Create a PgxFrameBuilder, this will also create a FrameBuilder on the server.
|
Modifier and Type | Method and Description |
---|---|
PgxFrameBuilder |
addRows(java.util.Map<java.lang.String,java.lang.Iterable<?>> rows)
Blocking version of
addRowsAsync(Map) . |
PgxFuture<PgxFrameBuilder> |
addRowsAsync(java.util.Map<java.lang.String,java.lang.Iterable<?>> rows)
Validates the news rows with the previously specified schema and adds them to the current frame builder
|
PgxFrame |
build(java.lang.String frameName)
Blocking version of
buildAsync(String) . |
PgxFuture<PgxFrame> |
buildAsync(java.lang.String frameName)
Builds a frame with the previously given schema and rows
|
PgxFuture<java.lang.Void> |
destroyAsync()
Requests destruction of this object.
|
close, destroy
public PgxFrameBuilder(SessionContext sessionContext, oracle.pgx.api.internal.Core core, java.util.List<ColumnDescriptor> schema, java.util.function.Function<oracle.pgx.api.internal.FrameMetaData,PgxFrame> buildCallback) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
sessionContext
- the context of the current sessioncore
- the Core to useschema
- the schema of the frame to buildbuildCallback
- a function to process the FrameMetaData into a PgxFramejava.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFrameBuilder addRows(java.util.Map<java.lang.String,java.lang.Iterable<?>> rows) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
addRowsAsync(Map)
. Calls addRowsAsync(Map)
and waits for the returned PgxFuture
to complete.rows
- the input rowsjava.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<PgxFrameBuilder> addRowsAsync(java.util.Map<java.lang.String,java.lang.Iterable<?>> rows)
rows
- the input rowspublic PgxFrame build(java.lang.String frameName) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
buildAsync(String)
. Calls buildAsync(String)
and waits for the returned PgxFuture
to complete.frameName
- name of the framejava.lang.InterruptedException
- if the caller thread gets interrupted while waiting for completion.java.util.concurrent.ExecutionException
- if any exception occurred during asynchronous execution. The actual exception will be nested.public PgxFuture<PgxFrame> buildAsync(java.lang.String frameName)
frameName
- name of the framepublic PgxFuture<java.lang.Void> destroyAsync()
Destroyable
destroyAsync
in class Destroyable