java.lang.Object
com.evolveum.midpoint.repo.common.activity.run.buckets.segmentation.BucketFactory

public class BucketFactory extends Object
Creates buckets when needed. See createNewBuckets(List, int) method.
  • Method Details

    • create

      public static BucketFactory create(@Nullable @Nullable ActivityDistributionDefinition distributionDefinition, @Nullable @Nullable ImplicitSegmentationResolver implicitSegmentationResolver, @NotNull @NotNull CommonTaskBeans beans)
    • createNewBuckets

      @NotNull public @NotNull List<WorkBucketType> createNewBuckets(@NotNull @NotNull List<WorkBucketType> currentBuckets, int bucketsNeeded) throws SchemaException
      Creates new buckets.
      Parameters:
      currentBuckets - Current list of buckets. This is used to determine where to start creating new buckets (sequential numbers, boundaries).
      bucketsNeeded - How many buckets does the client need? We can create more, if we want to. But not less; unless there is no more buckets available.
      Returns:
      Buckets created. We don't care about the state and worker reference.
      Throws:
      SchemaException
    • getContentFactory

      @NotNull public @NotNull BucketContentFactory getContentFactory()
    • estimateNumberOfBuckets

      public Integer estimateNumberOfBuckets()