public class BulkWriteOptions extends WriteOptions
| Constructor and Description |
|---|
BulkWriteOptions()
Create a
BulkWriteOptions with default values. |
BulkWriteOptions(BulkWriteOptions options) |
BulkWriteOptions(Durability durability,
long timeout,
TimeUnit timeoutUnit)
The options used to configure the bulk put operation.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBulkHeapPercent()
Returns the percentage of Runtime.maxMemory() that can be used for
the operation.
|
int |
getMaxRequestSize()
Returns the max number of bytes of records in a single bulk put request.
|
int |
getPerShardParallelism()
The maximum number of threads that can concurrently write a batch
of entries to a single shard in the store.
|
int |
getStreamParallelism()
Returns the maximum number of streams that can be read concurrently.
|
void |
setBulkHeapPercent(int bulkHeapPercent)
The percentage of Runtime.maxMemory() that can be used for the
operation.
|
void |
setMaxRequestSize(int maxRequestSize)
The max request size is used to limit the total number of bytes of
records in a single bulk put request.
|
void |
setPerShardParallelism(int perShardParallelism)
Sets the maximum number of threads that can concurrently write it's
batch of entries to a single shard in the store.
|
void |
setStreamParallelism(int streamParallelism)
Sets the maximum number of streams that can be read concurrently.
|
clone, getDurability, getTimeout, getTimeoutUnit, getUpdateTTL, setDurability, setTimeout, setUpdateTTL, toStringpublic BulkWriteOptions(Durability durability, long timeout, TimeUnit timeoutUnit)
durability - the durability to be used by the underlying
write operations that make up the bulk put.timeout - the timeout associated with the underlying
write operations that make up the bulk put.timeoutUnit - the units associated with the timeoutpublic BulkWriteOptions(BulkWriteOptions options)
public BulkWriteOptions()
BulkWriteOptions with default values.public int getBulkHeapPercent()
public void setBulkHeapPercent(int bulkHeapPercent)
The default is 40%.
public int getMaxRequestSize()
public void setMaxRequestSize(int maxRequestSize)
The default is 512K.
public int getPerShardParallelism()
public void setPerShardParallelism(int perShardParallelism)
The default value is 3 and allows for overlapping the reading of the next batch with processing of the current batch at a server node. Higher capacity networks and and storage nodes can allow for higher parallelism.
public int getStreamParallelism()
public void setStreamParallelism(int streamParallelism)
The default parallelism is 1. For streams with high overheads, say because the I/O device underlying the stream is slow and there are different I/O devices underlying each stream, a higher value would be appropriate.
Copyright (c) 2011, 2017 Oracle and/or its affiliates. All rights reserved.