@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface SessionConfiguration
Modifier and Type | Interface and Description |
---|---|
static class |
SessionConfiguration.FlushMode |
Modifier and Type | Method and Description |
---|---|
int |
countPendingErrors()
Return the number of errors which are pending.
|
SessionConfiguration.FlushMode |
getFlushMode()
Get the current flush mode.
|
RowErrorsAndOverflowStatus |
getPendingErrors()
Return any errors from previous calls.
|
long |
getTimeoutMillis()
Get the current timeout.
|
boolean |
hasPendingOperations()
Check if there are operations that haven't been completely applied.
|
boolean |
isClosed()
Returns true if this session has already been closed.
|
boolean |
isIgnoreAllDuplicateRows()
Tells if the session is currently ignoring row errors when the whole list returned by a tablet
server is of the AlreadyPresent type.
|
void |
setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)
Set the new external consistency mode for this session.
|
void |
setFlushInterval(int interval)
Set the flush interval, which will be used for the next scheduling decision.
|
void |
setFlushMode(SessionConfiguration.FlushMode flushMode)
Set the new flush mode for this session.
|
void |
setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)
Configures the option to ignore all the row errors if they are all of the AlreadyPresent type.
|
void |
setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)
Set the low watermark for this session.
|
void |
setMutationBufferSpace(int size)
Set the number of operations that can be buffered.
|
void |
setTimeoutMillis(long timeout)
Sets the timeout for the next applied operations.
|
SessionConfiguration.FlushMode getFlushMode()
AUTO_FLUSH_SYNC
by defaultvoid setFlushMode(SessionConfiguration.FlushMode flushMode)
flushMode
- new flush mode, can be the same as the previous one.IllegalArgumentException
- if the buffer isn't empty.void setMutationBufferSpace(int size)
size
- number of ops.IllegalArgumentException
- if the buffer isn't empty.void setMutationBufferLowWatermark(float mutationBufferLowWatermarkPercentage)
mutationBufferLowWatermarkPercentage
- a new low watermark as a percentage,
has to be between 0 and 1 (inclusive). A value of 1 disables
the low watermark since it's the same as the high oneIllegalArgumentException
- if the buffer isn't empty or if the watermark isn't between
0 and 1void setFlushInterval(int interval)
interval
- interval in milliseconds.long getTimeoutMillis()
void setTimeoutMillis(long timeout)
timeout
- Timeout in milliseconds.boolean isClosed()
boolean hasPendingOperations()
void setExternalConsistencyMode(ExternalConsistencyMode consistencyMode)
consistencyMode
- new external consistency mode, can the same as the previous one.IllegalArgumentException
- if the buffer isn't empty.boolean isIgnoreAllDuplicateRows()
void setIgnoreAllDuplicateRows(boolean ignoreAllDuplicateRows)
Disabled by default.
ignoreAllDuplicateRows
- true if this session should enforce this, else falseint countPendingErrors()
AUTO_FLUSH_BACKGROUND
mode.RowErrorsAndOverflowStatus getPendingErrors()
Clears the pending errors.
Copyright © 2017 The Apache Software Foundation. All rights reserved.