- All Known Implementing Classes:
FbBatchConfig.Immutable
- Since:
- 5
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Class to provide an immutable copy of a batch config. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
multiError()
value to signal to continue execution on errors.static final boolean
multiError()
value to signal to halt execution at first error.static final boolean
updateCounts()
value to signal to no supply update counts.static final int
batchBufferSize()
value to signal to use server default batch buffer size.static final int
detailedErrors()
value to signal to use server default detailed errors.static final int
batchBufferSize()
value to signal to use server maximum batch buffer size.static final boolean
updateCounts()
value to signal to supply update counts. -
Method Summary
Modifier and TypeMethodDescriptionint
Server-side batch buffer size in bytes.int
Number of detailed errors to return.default FbBatchConfig
boolean
Multi-error behaviour.static FbBatchConfig
of
(boolean multiError, boolean updateCounts, int detailedErrors, int batchBufferSize) Creates an immutable batch config.default void
Populates the provided batch parameter buffer with the configuration.boolean
Report update counts per element (called "record counts" in Firebird).
-
Field Details
-
CONTINUE_ON_ERROR
static final boolean CONTINUE_ON_ERRORmultiError()
value to signal to continue execution on errors.- See Also:
-
HALT_AT_FIRST_ERROR
static final boolean HALT_AT_FIRST_ERRORmultiError()
value to signal to halt execution at first error.- See Also:
-
UPDATE_COUNTS
static final boolean UPDATE_COUNTSupdateCounts()
value to signal to supply update counts.- See Also:
-
NO_UPDATE_COUNTS
static final boolean NO_UPDATE_COUNTSupdateCounts()
value to signal to no supply update counts.- See Also:
-
SERVER_DEFAULT_DETAILED_ERRORS
static final int SERVER_DEFAULT_DETAILED_ERRORSdetailedErrors()
value to signal to use server default detailed errors.NOTE: all negative values signal this. If you want to use this to check against a value, use
<= SERVER_DEFAULT_DETAILED_ERRORS
.- See Also:
-
SERVER_MAXIMUM_BUFFER_SIZE
static final int SERVER_MAXIMUM_BUFFER_SIZEbatchBufferSize()
value to signal to use server maximum batch buffer size.- See Also:
-
SERVER_DEFAULT_BUFFER_SIZE
static final int SERVER_DEFAULT_BUFFER_SIZEbatchBufferSize()
value to signal to use server default batch buffer size.NOTE: all negative values signal this. If you want to use this constant to check against a value, use
<= SERVER_DEFAULT_BUFFER_SIZE
.- See Also:
-
-
Method Details
-
multiError
boolean multiError()Multi-error behaviour.- Returns:
true
request multi-error (continue on failure), orfalse
to halt execution on first error
-
updateCounts
boolean updateCounts()Report update counts per element (called "record counts" in Firebird).- Returns:
true
report update counts,false
do not report update counts
-
detailedErrors
int detailedErrors()Number of detailed errors to return.A value of
0
disables detailed errors. When a value< 0
is returned, the server-side default is used (64 as of Firebird 4
). Requesting detailed errors exceeding the maximum (256 as of Firebird 4) will be silently set to the server maximum.- Returns:
- number of detailed errors,
0
to disable detailed errors,< 0
for server default
-
batchBufferSize
int batchBufferSize()Server-side batch buffer size in bytes.When a value
< 0
is returned, the server-side default (16MB as of Firebird 4) will be used. When a value of0
is returned , the server-side maximum will be used. Requesting buffer sizes exceeding the maximum (256MB as of Firebird 4) will be silently set to the server maximum.- Returns:
- maximum batch buffer size, return
< 0
to use server-side default (16MB as of Firebird 4),0
for the server-side maximum (256MB as of Firebird 4)
-
immutable
- Returns:
- immutable, frozen copy of this batch config
-
of
static FbBatchConfig of(boolean multiError, boolean updateCounts, int detailedErrors, int batchBufferSize) Creates an immutable batch config.- Returns:
- an immutable batch config with the specified configuration
-
populateBatchParameterBuffer
Populates the provided batch parameter buffer with the configuration.This method will remove previously set items which are managed by this method. Items not managed by this method are untouched. At minimum this method manages items
TAG_MULTIERROR
,TAG_RECORD_COUNTS
,TAG_DETAILED_ERRORS
, andTAG_BUFFER_BYTES_SIZE
.- Parameters:
batchPb
- batch parameter buffer to populate.
-