ScanPolicy

ScanPolicy

A policy affecting the behavior of scan operations.

Constructor

new ScanPolicy(propsopt)

Description:
  • Initializes a new ScanPolicy from the provided policy values.

Source:
Since:
  • v3.0.0
Parameters:
Name Type Attributes Description
props Object <optional>

Policy values

Extends

Members

compress :boolean

Description:
  • Use zlib compression on write or batch read commands when the command buffer size is greater than 128 bytes. In addition, tell the server to compress it's response on read commands. The server response compression threshold is also 128 bytes.

    This option will increase cpu and memory usage (for extra compressed buffers), but decrease the size of data sent over the network.

    Requires Enterprise Server version >= 4.8.

Source:
Since:
  • v3.14.0
Overrides:

Use zlib compression on write or batch read commands when the command buffer size is greater than 128 bytes. In addition, tell the server to compress it's response on read commands. The server response compression threshold is also 128 bytes.

This option will increase cpu and memory usage (for extra compressed buffers), but decrease the size of data sent over the network.

Requires Enterprise Server version >= 4.8.

Type:
  • boolean

durableDelete :boolean

Description:
  • Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Source:
Default Value:
  • false (do not tombstone deleted records)

Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Type:
  • boolean

durableDelete :boolean

Description:
  • Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Source:
Default Value:
  • false (do not tombstone deleted records)

Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Type:
  • boolean

filterExpression

Description:
Source:
Overrides:

Optional expression filter. If filter exp exists and evaluates to false, the transaction is ignored. This can be used to eliminate a client/server roundtrip in some cases.

expression filters can only be applied to the following commands:

maxRecords :number

Description:
  • Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

    Requires server >= 4.9.

Source:
Since:
  • v3.16.0
Default Value:
  • 0 (do not limit record count)

Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

Requires server >= 4.9.

Type:
  • number

maxRecords :number

Description:
  • Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

    Requires server >= 4.9.

Source:
Since:
  • v3.16.0
Default Value:
  • 0 (do not limit record count)

Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

Requires server >= 4.9.

Type:
  • number

maxRetries :number

Description:
  • Maximum number of retries before aborting the current transaction. The initial attempt is not counted as a retry.

    If maxRetries is exceeded, the transaction will return error ERR_TIMEOUT.

    WARNING: Database writes that are not idempotent (such as "add") should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It is important to use a distinct write policy for non-idempotent writes which sets maxRetries to zero.

Source:
Overrides:

Maximum number of retries before aborting the current transaction. The initial attempt is not counted as a retry.

If maxRetries is exceeded, the transaction will return error ERR_TIMEOUT.

WARNING: Database writes that are not idempotent (such as "add") should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It is important to use a distinct write policy for non-idempotent writes which sets maxRetries to zero.

Type:
  • number

recordsPerSecond :number

Description:
  • Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

    Requires server >= 4.7.

Source:
Since:
  • v3.14.0
Default Value:
  • 0

Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

Requires server >= 4.7.

Type:
  • number

recordsPerSecond :number

Description:
  • Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

    Requires server >= 4.7.

Source:
Since:
  • v3.14.0
Default Value:
  • 0

Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

Requires server >= 4.7.

Type:
  • number

replica :number

Description:
  • Specifies the replica to be consulted for the scan operation.

Source:
See:

Specifies the replica to be consulted for the scan operation.

Type:
  • number

replica :number

Description:
  • Specifies the replica to be consulted for the scan operation.

Source:
See:

Specifies the replica to be consulted for the scan operation.

Type:
  • number

socketTimeout :number

Description:
  • Socket idle timeout in milliseconds when processing a database command.

    If socketTimeout is not zero and the socket has been idle for at least socketTimeout, both maxRetries and totalTimeout are checked. If maxRetries and totalTimeout are not exceeded, the transaction is retried.

    If both socketTimeout and totalTimeout are non-zero and socketTimeout > totalTimeout, then socketTimeout will be set to totalTimeout. If socketTimeout is zero, there will be no socket idle limit.

Source:
Overrides:
Default Value:
  • 0 (no socket idle time limit).

Socket idle timeout in milliseconds when processing a database command.

If socketTimeout is not zero and the socket has been idle for at least socketTimeout, both maxRetries and totalTimeout are checked. If maxRetries and totalTimeout are not exceeded, the transaction is retried.

If both socketTimeout and totalTimeout are non-zero and socketTimeout > totalTimeout, then socketTimeout will be set to totalTimeout. If socketTimeout is zero, there will be no socket idle limit.

Type:
  • number

totalTimeout :number

Description:
  • Total transaction timeout in milliseconds.

    The totalTimeout is tracked on the client and sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server also has the capability to timeout the transaction.

    If totalTimeout is not zero and totalTimeout is reached before the transaction completes, the transaction will return error ERR_TIMEOUT. If totalTimeout is zero, there will be no total time limit.

Source:
Overrides:
Default Value:
  • 0

Total transaction timeout in milliseconds.

The totalTimeout is tracked on the client and sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server also has the capability to timeout the transaction.

If totalTimeout is not zero and totalTimeout is reached before the transaction completes, the transaction will return error ERR_TIMEOUT. If totalTimeout is zero, there will be no total time limit.

Type:
  • number

ScanPolicy

A policy affecting the behavior of scan operations.

Constructor

new ScanPolicy(propsopt)

Description:
  • Initializes a new ScanPolicy from the provided policy values.

Source:
Since:
  • v3.0.0
Parameters:
Name Type Attributes Description
props Object <optional>

Policy values

Extends

Members

compress :boolean

Description:
  • Use zlib compression on write or batch read commands when the command buffer size is greater than 128 bytes. In addition, tell the server to compress it's response on read commands. The server response compression threshold is also 128 bytes.

    This option will increase cpu and memory usage (for extra compressed buffers), but decrease the size of data sent over the network.

    Requires Enterprise Server version >= 4.8.

Source:
Since:
  • v3.14.0
Overrides:

Use zlib compression on write or batch read commands when the command buffer size is greater than 128 bytes. In addition, tell the server to compress it's response on read commands. The server response compression threshold is also 128 bytes.

This option will increase cpu and memory usage (for extra compressed buffers), but decrease the size of data sent over the network.

Requires Enterprise Server version >= 4.8.

Type:
  • boolean

durableDelete :boolean

Description:
  • Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Source:
Default Value:
  • false (do not tombstone deleted records)

Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Type:
  • boolean

durableDelete :boolean

Description:
  • Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Source:
Default Value:
  • false (do not tombstone deleted records)

Specifies whether a tombstone should be written in place of a record that gets deleted as a result of this operation.

Type:
  • boolean

filterExpression

Description:
Source:
Overrides:

Optional expression filter. If filter exp exists and evaluates to false, the transaction is ignored. This can be used to eliminate a client/server roundtrip in some cases.

expression filters can only be applied to the following commands:

maxRecords :number

Description:
  • Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

    Requires server >= 4.9.

Source:
Since:
  • v3.16.0
Default Value:
  • 0 (do not limit record count)

Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

Requires server >= 4.9.

Type:
  • number

maxRecords :number

Description:
  • Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

    Requires server >= 4.9.

Source:
Since:
  • v3.16.0
Default Value:
  • 0 (do not limit record count)

Approximate number of records to return to client. This number is divided by the number of nodes involved in the scan. The actual number of records returned may be less than maxRecords if node record counts are small and unbalanced across nodes.

Requires server >= 4.9.

Type:
  • number

maxRetries :number

Description:
  • Maximum number of retries before aborting the current transaction. The initial attempt is not counted as a retry.

    If maxRetries is exceeded, the transaction will return error ERR_TIMEOUT.

    WARNING: Database writes that are not idempotent (such as "add") should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It is important to use a distinct write policy for non-idempotent writes which sets maxRetries to zero.

Source:
Overrides:

Maximum number of retries before aborting the current transaction. The initial attempt is not counted as a retry.

If maxRetries is exceeded, the transaction will return error ERR_TIMEOUT.

WARNING: Database writes that are not idempotent (such as "add") should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It is important to use a distinct write policy for non-idempotent writes which sets maxRetries to zero.

Type:
  • number

recordsPerSecond :number

Description:
  • Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

    Requires server >= 4.7.

Source:
Since:
  • v3.14.0
Default Value:
  • 0

Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

Requires server >= 4.7.

Type:
  • number

recordsPerSecond :number

Description:
  • Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

    Requires server >= 4.7.

Source:
Since:
  • v3.14.0
Default Value:
  • 0

Limit returned records per second (RPS) rate for each server. Do not apply RPS limit if recordsPerSecond is zero.

Requires server >= 4.7.

Type:
  • number

replica :number

Description:
  • Specifies the replica to be consulted for the scan operation.

Source:
See:

Specifies the replica to be consulted for the scan operation.

Type:
  • number

replica :number

Description:
  • Specifies the replica to be consulted for the scan operation.

Source:
See:

Specifies the replica to be consulted for the scan operation.

Type:
  • number

socketTimeout :number

Description:
  • Socket idle timeout in milliseconds when processing a database command.

    If socketTimeout is not zero and the socket has been idle for at least socketTimeout, both maxRetries and totalTimeout are checked. If maxRetries and totalTimeout are not exceeded, the transaction is retried.

    If both socketTimeout and totalTimeout are non-zero and socketTimeout > totalTimeout, then socketTimeout will be set to totalTimeout. If socketTimeout is zero, there will be no socket idle limit.

Source:
Overrides:
Default Value:
  • 0 (no socket idle time limit).

Socket idle timeout in milliseconds when processing a database command.

If socketTimeout is not zero and the socket has been idle for at least socketTimeout, both maxRetries and totalTimeout are checked. If maxRetries and totalTimeout are not exceeded, the transaction is retried.

If both socketTimeout and totalTimeout are non-zero and socketTimeout > totalTimeout, then socketTimeout will be set to totalTimeout. If socketTimeout is zero, there will be no socket idle limit.

Type:
  • number

totalTimeout :number

Description:
  • Total transaction timeout in milliseconds.

    The totalTimeout is tracked on the client and sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server also has the capability to timeout the transaction.

    If totalTimeout is not zero and totalTimeout is reached before the transaction completes, the transaction will return error ERR_TIMEOUT. If totalTimeout is zero, there will be no total time limit.

Source:
Overrides:
Default Value:
  • 0

Total transaction timeout in milliseconds.

The totalTimeout is tracked on the client and sent to the server along with the transaction in the wire protocol. The client will most likely timeout first, but the server also has the capability to timeout the transaction.

If totalTimeout is not zero and totalTimeout is reached before the transaction completes, the transaction will return error ERR_TIMEOUT. If totalTimeout is zero, there will be no total time limit.

Type:
  • number