Class BaseOverflowRecordFilter

    • Constructor Detail

      • BaseOverflowRecordFilter

        public BaseOverflowRecordFilter()
    • Method Detail

      • storeValue

        protected abstract void storeValue​(String key,
                                           byte[] data)
        Sets the value associated to the key.
      • fetchValue

        protected abstract byte[] fetchValue​(String key)
        Fetches a value previously stored by storeValue(String, byte[])
        Returns:
        the value, or null if there is no value
      • parseIntOrDefault

        protected int parseIntOrDefault​(String valueAsString,
                                        int defaultValue)
      • beforeAppend

        public Record beforeAppend​(Record record)
        Description copied from interface: RecordFilter
        Called before appending a record to a stream. This hook enables to change the record or to skip it when returning null.
        Specified by:
        beforeAppend in interface RecordFilter
        Parameters:
        record - the record that will be appended to a stream
      • getUniqRecordKey

        protected String getUniqRecordKey​(Record record)
      • afterRead

        public Record afterRead​(Record record,
                                LogOffset offset)
        Description copied from interface: RecordFilter
        Called after reading a record. This hook enables to change the record or to skip it when returning null.
        Specified by:
        afterRead in interface RecordFilter
        Parameters:
        record - the record
        offset - the offset of the record
      • getThresholdSize

        public int getThresholdSize()
      • setThresholdSize

        public void setThresholdSize​(int thresholdSize)
      • getStoreName

        public String getStoreName()
      • setStoreName

        public void setStoreName​(String storeName)
      • getStoreTTL

        public Duration getStoreTTL()
      • setStoreTTL

        public void setStoreTTL​(Duration storeTTL)
      • getPrefix

        public String getPrefix()
      • setPrefix

        public void setPrefix​(String prefix)
      • getPrefixedKey

        protected String getPrefixedKey​(String recordKey)