Package io.pravega.client.stream
Class EventWriterConfig
- java.lang.Object
-
- io.pravega.client.stream.EventWriterConfig
-
- All Implemented Interfaces:
java.io.Serializable
public class EventWriterConfig extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventWriterConfig.EventWriterConfigBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventWriterConfig.EventWriterConfigBuilder
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
static EventWriterConfig
fromBytes(java.nio.ByteBuffer buff)
int
getBackoffMultiple()
Backoff multiplier used in the retry logic of the writer.int
getInitialBackoffMillis()
Initial backoff in milli seconds used in the retry logic of the writer.int
getMaxBackoffMillis()
Maximum backoff in milli seconds used in the retry logic of the writer.int
getRetryAttempts()
Maximum retry attempts performed by the writer before throwing aRetriesExhaustedException
.long
getTransactionTimeoutTime()
The transaction timeout parameter corresponds to the lease renewal period.int
hashCode()
boolean
isAutomaticallyNoteTime()
Automatically invokeEventStreamWriter.noteTime(long)
passingSystem.currentTimeMillis()
on a regular interval.boolean
isEnableConnectionPooling()
Enable or disable connection pooling for writer.boolean
isEnableLargeEvents()
Enable or disable whether LargeEvent writes should be processed and sent to the SegmentStore.java.nio.ByteBuffer
toBytes()
java.lang.String
toString()
-
-
-
Method Detail
-
toBytes
public java.nio.ByteBuffer toBytes()
-
fromBytes
public static EventWriterConfig fromBytes(java.nio.ByteBuffer buff)
-
builder
public static EventWriterConfig.EventWriterConfigBuilder builder()
-
getInitialBackoffMillis
public int getInitialBackoffMillis()
Initial backoff in milli seconds used in the retry logic of the writer. The default value is 1ms.- Returns:
- Initial backoff in milli seconds used in the retry logic of the writer.
-
getMaxBackoffMillis
public int getMaxBackoffMillis()
Maximum backoff in milli seconds used in the retry logic of the writer. The default value is 20000.- Returns:
- Maximum backoff in milli seconds used in the retry logic of the writer.
-
getRetryAttempts
public int getRetryAttempts()
Maximum retry attempts performed by the writer before throwing aRetriesExhaustedException
. The default value is 10.- Returns:
- Maximum retry attempts performed by the writer before throwing a
RetriesExhaustedException
.
-
getBackoffMultiple
public int getBackoffMultiple()
Backoff multiplier used in the retry logic of the writer. The default value is 10.- Returns:
- Backoff multiplier used in the retry logic of the writer.
-
isEnableConnectionPooling
public boolean isEnableConnectionPooling()
Enable or disable connection pooling for writer. The default value is false.- Returns:
- Enable or disable connection pooling for writer.
-
getTransactionTimeoutTime
public long getTransactionTimeoutTime()
The transaction timeout parameter corresponds to the lease renewal period. In every period, the client must send at least one ping to keep the txn alive. If the client fails to do so, then Pravega aborts the txn automatically. The client sends pings internally and requires no application intervention, only that it sets this parameter accordingly. This parameter is additionally used to determine the total amount of time that a txn can remain open. Currently, we set the maximum amount of time for a txn to remain open to be the minimum between 1 day and 1,000 times the value of the lease renewal period. The 1,000 is hardcoded and has been chosen arbitrarily to be a large enough value. The maximum allowed lease time by default is 600s, see: io.pravega.controller.util.Config.PROPERTY_TXN_MAX_LEASE The maximum allowed lease time is a configuration parameter of the controller and can be changed accordingly. Note that being a controller-wide parameter, it affects all transactions.- Returns:
- Transaction timeout parameter corresponding to lease renewal period
-
isAutomaticallyNoteTime
public boolean isAutomaticallyNoteTime()
Automatically invokeEventStreamWriter.noteTime(long)
passingSystem.currentTimeMillis()
on a regular interval.- Returns:
- Interval to regularly invoke
EventStreamWriter.noteTime(long)
.
-
isEnableLargeEvents
public boolean isEnableLargeEvents()
Enable or disable whether LargeEvent writes should be processed and sent to the SegmentStore. A LargeEvent is defined as any event containing a number of bytes greater thanSerializer.MAX_EVENT_SIZE
.- Returns:
- LargeEvent processing is enabled or disabled.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-