Class EventProcessorBuilder

    • Field Detail

      • allAttributesPrivate

        protected boolean allAttributesPrivate
      • capacity

        protected int capacity
      • diagnosticRecordingIntervalMillis

        protected int diagnosticRecordingIntervalMillis
      • flushIntervalMillis

        protected int flushIntervalMillis
      • inlineUsers

        protected boolean inlineUsers
      • privateAttributes

        protected java.util.Set<java.lang.String> privateAttributes
    • Constructor Detail

      • EventProcessorBuilder

        public EventProcessorBuilder()
    • Method Detail

      • allAttributesPrivate

        public EventProcessorBuilder allAttributesPrivate​(boolean allAttributesPrivate)
        Sets whether or not all optional user attributes should be hidden from LaunchDarkly.

        If this is true, all user attribute values (other than the key) will be private, not just the attributes specified in privateAttributes(String...) or on a per-user basis with LDUser.Builder methods. By default, it is false.

        Parameters:
        allAttributesPrivate - true if all user attributes should be private
        Returns:
        the builder
        See Also:
        privateAttributes(String...), LDUser.Builder
      • capacity

        public EventProcessorBuilder capacity​(int capacity)
        Set the capacity of the events buffer.

        The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed (see flushIntervalMillis(int), events will be discarded. Increasing the capacity means that events are less likely to be discarded, at the cost of consuming more memory.

        The default value is DEFAULT_CAPACITY.

        Parameters:
        capacity - the capacity of the event buffer
        Returns:
        the builder
      • flushIntervalMillis

        public EventProcessorBuilder flushIntervalMillis​(int flushIntervalMillis)
        Sets the interval between flushes of the event buffer.

        Decreasing the flush interval means that the event buffer is less likely to reach capacity.

        The default value is DEFAULT_FLUSH_INTERVAL_MILLIS.

        Parameters:
        flushIntervalMillis - the flush interval in milliseconds
        Returns:
        the builder
      • inlineUsers

        public EventProcessorBuilder inlineUsers​(boolean inlineUsers)
        If enabled, events to the server will be created containing the entire LDUser object. If disabled, events to the server will be created without the entire LDUser object, including only the user key instead; the rest of the user properties will still be included in Identify events.

        Defaults to false in order to reduce network bandwidth.

        Parameters:
        inlineUsers - true if all user properties should be included in events
        Returns:
        the builder
      • privateAttributes

        public EventProcessorBuilder privateAttributes​(java.lang.String... attributeNames)
        Marks a set of attribute names or subproperties as private.

        Any contexts sent to LaunchDarkly with this configuration active will have attributes with these names removed. This is in addition to any attributes that were marked as private for an individual context with LDUser.Builder methods.

        This method replaces any previous private attributes that were set on the same builder, rather than adding to them.

        Parameters:
        attributeNames - a set of attribute names that will be removed from context data set to LaunchDarkly
        Returns:
        the builder
        See Also:
        allAttributesPrivate(boolean), LDUser.Builder