Class EventWriterConfig

  • All Implemented Interfaces:
    java.io.Serializable

    public class EventWriterConfig
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Method Detail

      • toBytes

        public java.nio.ByteBuffer toBytes()
      • fromBytes

        public static EventWriterConfig fromBytes​(java.nio.ByteBuffer buff)
      • 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 a RetriesExhaustedException. 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
      • 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 than Serializer.MAX_EVENT_SIZE.
        Returns:
        LargeEvent processing is enabled or disabled.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object