Class SnapshotProducer.Builder

    • Method Detail

      • clock

        @NonNull
        public SnapshotProducer.Builder clock​(@NonNull
                                              @NonNull java.time.Clock clock)
        Use the given Clock when generating timestamps for new entities.
        Parameters:
        clock - the clock to use for timestamps
        Returns:
        this builder
      • maxBytesPerPage

        @NonNull
        public @NonNull SnapshotProducer.Builder maxBytesPerPage​(long maxBytesPerPage)
        Set the maximum bytes per page. When a page is composed, a new page will be created if the current page gets too big. Defaults to 1 MB.
        Parameters:
        maxBytesPerPage - the maximum bytes per page. Must be equal or greater than 1.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - if the argument is < 1
      • maxEntitiesPerPage

        @NonNull
        public @NonNull SnapshotProducer.Builder maxEntitiesPerPage​(long maxEntitiesPerPage)
        Set the maximum entities per page. When a page is composed, a new page will be created if the current page has too many entities. Defaults to Long.MAX_VALUE (meaning no limit).
        Parameters:
        maxEntitiesPerPage - the maximum number of entities per page. Must be equal or greater than 1.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - if the argument is < 1