public abstract class SizeLimitedUpdateOperation extends BaseUpdateOperation
BaseUpdateOperation
extension that filters input data that is "too large". Implementations of this class are
free to load SINGLE documents into memory. This provides no protection against loading ALL documents into memory. The
filter limit is 1 MB by default and can be overwritten with MAX_SIZE_CONTAINER_PROP_KEY
container property
if set. Inputs that exceed the limit will be filtered out and marked as an application error. It's still best
practice to use a proper in memory parser instead of converting every stream to a string or byte[]. Atom owners can
set MAX_SIZE_CONTAINER_PROP_KEY
to DEFAULT_IGNORE_MAX_SIZE_VALUE
to ignore filtering based on input
data size and let ALL documents thru.Modifier | Constructor and Description |
---|---|
protected |
SizeLimitedUpdateOperation(BaseConnection<OperationContext> connection)
Creates a new instance using the provided connection.
|
protected |
SizeLimitedUpdateOperation(OperationContext context)
Creates a new instance using the provided context.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
executeSizeLimitedUpdate(UpdateRequest request,
OperationResponse response)
Execute the implementation update logic
|
protected void |
executeUpdate(UpdateRequest request,
OperationResponse response)
Creates a filtered
UpdateRequest that does not include any documents that exceed the size limit. |
protected String |
getSizeExceededMessage()
Returns the status message for excluded inputs.
|
protected String |
getSizeExceededStatusCode()
Returns the status code for excluded.
|
protected boolean |
includeSizeExceededPayload()
Indicates if the input document should be echoed as the application error payload.
|
execute
getConnection, getContext
protected SizeLimitedUpdateOperation(BaseConnection<OperationContext> connection)
protected SizeLimitedUpdateOperation(OperationContext context)
protected final void executeUpdate(UpdateRequest request, OperationResponse response)
UpdateRequest
that does not include any documents that exceed the size limit. The
filtered request is passed to executeSizeLimitedUpdate(UpdateRequest, OperationResponse)
implementation.executeUpdate
in class BaseUpdateOperation
request
- request given to BaseUpdateOperation.execute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
, downcast to the correct typeresponse
- response given to BaseUpdateOperation.execute(com.boomi.connector.api.OperationRequest, com.boomi.connector.api.OperationResponse)
protected abstract void executeSizeLimitedUpdate(UpdateRequest request, OperationResponse response)
request
- the filtered requestresponse
- the operation responseprotected String getSizeExceededStatusCode()
DEFAULT_STATUS_CODE
.protected String getSizeExceededMessage()
DEFAULT_STATUS_MESSAGE
.protected boolean includeSizeExceededPayload()