Class Config

java.lang.Object
io.kubfly.sdk.output.bucket.Config

public final class Config extends Object
The configuration of the collector, taken once from Config.VARS: the bucket, the names of the stand and the limits of the format. Wrong numbers fall back to their defaults and are listed in PROBLEMS; a missing or wrong name of the stand or bucket is an error at the start of the collector (check()): the application does not start (decisions 22, 27).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Param<Integer>
    The interval of the segments of alerts, s (KUBFLY_OUTPUT_BUCKET_ALERTS_FLUSH, 60).
    static final Param<Boolean>
    Whether a new alert closes its segment soon (KUBFLY_OUTPUT_BUCKET_ALERTS_URGENT, on).
    static final Param<Long>
    The buffer of the attachments, bytes (KUBFLY_OUTPUT_BUCKET_ATTACHMENT_BYTES, 32 MiB): two halves made when the output starts; the largest attachment is a half, one without room is lost.
    static final Param<Integer>
    The size of a block, bytes (KUBFLY_OUTPUT_BUCKET_BLOCK_SIZE, 1 MiB).
    static final Param<Boolean>
    Whether the collector of the bucket is on: ON — always (a missing bucket is an error), OFF — never, AUTO (by default) — when KUBFLY_OUTPUT_BUCKET_KIND is set.
    static final String
    The switch of the collector (KUBFLY_OUTPUT_BUCKET): ON, OFF or AUTO.
    static final Option<BucketBuilder>
    The builder of the bucket (KUBFLY_OUTPUT_BUCKET_KIND, KUBFLY_OUTPUT_BUCKET_…); None if it is missing or wrong (then check() fails).
    static final Param<String>
    The sources of the build (KUBFLY_OUTPUT_BUCKET_CODE): a directory, or a .zip or .jar of them; with KUBFLY_BUILD the first instance of the build puts its code into the bucket.
    static final Param<Integer>
    The level of deflate (KUBFLY_OUTPUT_BUCKET_DEFLATE_LEVEL, 1).
    static final Param<Integer>
    The interval of the segments of events, s (KUBFLY_OUTPUT_BUCKET_EVENTS_FLUSH, 60).
    static final Param<Level>
    The level from which an event closes its segment soon (KUBFLY_OUTPUT_BUCKET_EVENTS_URGENT, ERROR); OFF — never.
    static final Param<Integer>
    The interval of the segments of health, s (KUBFLY_OUTPUT_BUCKET_HEALTH_FLUSH, 60).
    static final List<RecipientPublicKey>
    The public keys of the recipients (KUBFLY_OUTPUT_BUCKET_KEYS, KUBFLY_OUTPUT_BUCKET_KEYS_FILE), without repeats; empty — the segments are written without a cipher.
    static final Param<String>
    A file of more public keys of recipients (KUBFLY_OUTPUT_BUCKET_KEYS_FILE).
    static final Param<Level>
    The most verbose level taken (KUBFLY_OUTPUT_BUCKET_LEVEL, INFO).
    static final Param<Integer>
    The interval of the segments of metrics, s (KUBFLY_OUTPUT_BUCKET_METRICS_FLUSH, 60).
    static final List<String>
    Wrong values that fell back to their defaults.
    static final Param<Integer>
    The interval of the segments of profiles, s (KUBFLY_OUTPUT_BUCKET_PROFILES_FLUSH, 60); the stream is always encrypted when the keys are set.
    static final Param<String>
    The public keys of the recipients, as set (KUBFLY_OUTPUT_BUCKET_KEYS): a secret parameter.
    static final Param<Long>
    The size of a segment, blocks (KUBFLY_OUTPUT_BUCKET_SEGMENT_BLOCKS, 32).
    static final Param<Path>
    The directory of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL); None — no spool (by default, decision 6).
    static final Param<Long>
    The most bytes of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL_BYTES, 1 GiB).
    static final Param<Integer>
    The most segments of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL_FILES, 10 000).
    static final List<Param<String>>
    The parameters of the bucket itself (KUBFLY_OUTPUT_BUCKET_KIND, _ROOT, _ENDPOINT…) as set, the access and secret keys secure: the module kubfly-sdk-bucket reads them for BUILDER.
    static final Param<Integer>
    The interval of the segments of tracks, s (KUBFLY_OUTPUT_BUCKET_TRACKS_FLUSH, 60); the stream is always encrypted when the keys are set: the places of people are personal data.
    static final Param<Boolean>
    Whether the stream traffic is encrypted, as events and metrics, when the keys are set ( KUBFLY_OUTPUT_BUCKET_TRAFFIC_ENCRYPT, on): off — open, as alerts.
    static final Param<Integer>
    The interval of the segments of traffic, s (KUBFLY_OUTPUT_BUCKET_TRAFFIC_FLUSH, 60).
    static final Param<Integer>
    How long after an urgent record its segment closes, ms (KUBFLY_OUTPUT_BUCKET_URGENT_DELAY; by default the ordering window of the pipeline, PipelineSettings.WINDOW).
    static final Param<Integer>
    The least time between urgent closes of a stream, s (KUBFLY_OUTPUT_BUCKET_URGENT_INTERVAL, 5).
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Fails if the stand or the bucket is not configured.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BUCKET_VARIABLE

      public static final String BUCKET_VARIABLE
      The switch of the collector (KUBFLY_OUTPUT_BUCKET): ON, OFF or AUTO.
      See Also:
    • BUCKET

      public static final Param<Boolean> BUCKET
      Whether the collector of the bucket is on: ON — always (a missing bucket is an error), OFF — never, AUTO (by default) — when KUBFLY_OUTPUT_BUCKET_KIND is set. The other collectors do not matter.
    • BUILDER

      public static final Option<BucketBuilder> BUILDER
      The builder of the bucket (KUBFLY_OUTPUT_BUCKET_KIND, KUBFLY_OUTPUT_BUCKET_…); None if it is missing or wrong (then check() fails).
    • EVENTS_FLUSH

      public static final Param<Integer> EVENTS_FLUSH
      The interval of the segments of events, s (KUBFLY_OUTPUT_BUCKET_EVENTS_FLUSH, 60).
    • METRICS_FLUSH

      public static final Param<Integer> METRICS_FLUSH
      The interval of the segments of metrics, s (KUBFLY_OUTPUT_BUCKET_METRICS_FLUSH, 60).
    • ALERTS_FLUSH

      public static final Param<Integer> ALERTS_FLUSH
      The interval of the segments of alerts, s (KUBFLY_OUTPUT_BUCKET_ALERTS_FLUSH, 60).
    • HEALTH_FLUSH

      public static final Param<Integer> HEALTH_FLUSH
      The interval of the segments of health, s (KUBFLY_OUTPUT_BUCKET_HEALTH_FLUSH, 60).
    • TRAFFIC_FLUSH

      public static final Param<Integer> TRAFFIC_FLUSH
      The interval of the segments of traffic, s (KUBFLY_OUTPUT_BUCKET_TRAFFIC_FLUSH, 60).
    • TRAFFIC_ENCRYPT

      public static final Param<Boolean> TRAFFIC_ENCRYPT
      Whether the stream traffic is encrypted, as events and metrics, when the keys are set ( KUBFLY_OUTPUT_BUCKET_TRAFFIC_ENCRYPT, on): off — open, as alerts.
    • PROFILES_FLUSH

      public static final Param<Integer> PROFILES_FLUSH
      The interval of the segments of profiles, s (KUBFLY_OUTPUT_BUCKET_PROFILES_FLUSH, 60); the stream is always encrypted when the keys are set.
    • TRACKS_FLUSH

      public static final Param<Integer> TRACKS_FLUSH
      The interval of the segments of tracks, s (KUBFLY_OUTPUT_BUCKET_TRACKS_FLUSH, 60); the stream is always encrypted when the keys are set: the places of people are personal data.
    • SPOOL

      public static final Param<Path> SPOOL
      The directory of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL); None — no spool (by default, decision 6).
    • SPOOL_BYTES

      public static final Param<Long> SPOOL_BYTES
      The most bytes of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL_BYTES, 1 GiB).
    • ATTACHMENT_BYTES

      public static final Param<Long> ATTACHMENT_BYTES
      The buffer of the attachments, bytes (KUBFLY_OUTPUT_BUCKET_ATTACHMENT_BYTES, 32 MiB): two halves made when the output starts; the largest attachment is a half, one without room is lost.
    • SPOOL_FILES

      public static final Param<Integer> SPOOL_FILES
      The most segments of the spool (KUBFLY_OUTPUT_BUCKET_SPOOL_FILES, 10 000).
    • BLOCK_SIZE

      public static final Param<Integer> BLOCK_SIZE
      The size of a block, bytes (KUBFLY_OUTPUT_BUCKET_BLOCK_SIZE, 1 MiB).
    • SEGMENT_BLOCKS

      public static final Param<Long> SEGMENT_BLOCKS
      The size of a segment, blocks (KUBFLY_OUTPUT_BUCKET_SEGMENT_BLOCKS, 32).
    • DEFLATE_LEVEL

      public static final Param<Integer> DEFLATE_LEVEL
      The level of deflate (KUBFLY_OUTPUT_BUCKET_DEFLATE_LEVEL, 1).
    • LEVEL

      public static final Param<Level> LEVEL
      The most verbose level taken (KUBFLY_OUTPUT_BUCKET_LEVEL, INFO).
    • EVENTS_URGENT

      public static final Param<Level> EVENTS_URGENT
      The level from which an event closes its segment soon (KUBFLY_OUTPUT_BUCKET_EVENTS_URGENT, ERROR); OFF — never.
    • ALERTS_URGENT

      public static final Param<Boolean> ALERTS_URGENT
      Whether a new alert closes its segment soon (KUBFLY_OUTPUT_BUCKET_ALERTS_URGENT, on).
    • URGENT_DELAY

      public static final Param<Integer> URGENT_DELAY
      How long after an urgent record its segment closes, ms (KUBFLY_OUTPUT_BUCKET_URGENT_DELAY; by default the ordering window of the pipeline, PipelineSettings.WINDOW).
    • URGENT_INTERVAL

      public static final Param<Integer> URGENT_INTERVAL
      The least time between urgent closes of a stream, s (KUBFLY_OUTPUT_BUCKET_URGENT_INTERVAL, 5).
    • KEYS

      public static final List<RecipientPublicKey> KEYS
      The public keys of the recipients (KUBFLY_OUTPUT_BUCKET_KEYS, KUBFLY_OUTPUT_BUCKET_KEYS_FILE), without repeats; empty — the segments are written without a cipher.
    • RECIPIENT_KEYS

      public static final Param<String> RECIPIENT_KEYS
      The public keys of the recipients, as set (KUBFLY_OUTPUT_BUCKET_KEYS): a secret parameter.
    • KEYS_FILE

      public static final Param<String> KEYS_FILE
      A file of more public keys of recipients (KUBFLY_OUTPUT_BUCKET_KEYS_FILE).
    • CODE

      public static final Param<String> CODE
      The sources of the build (KUBFLY_OUTPUT_BUCKET_CODE): a directory, or a .zip or .jar of them; with KUBFLY_BUILD the first instance of the build puts its code into the bucket.
    • STORE

      public static final List<Param<String>> STORE
      The parameters of the bucket itself (KUBFLY_OUTPUT_BUCKET_KIND, _ROOT, _ENDPOINT…) as set, the access and secret keys secure: the module kubfly-sdk-bucket reads them for BUILDER.
    • PROBLEMS

      public static final List<String> PROBLEMS
      Wrong values that fell back to their defaults.
  • Method Details

    • check

      public static void check()
      Fails if the stand or the bucket is not configured.
      Throws:
      IllegalStateException - with every missing or wrong name, so the application does not start