
com.fluxtion.runtime.partition.Partitioner Maven / Gradle / Ivy
/*
* Copyright (C) 2018 V12 Technology Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* .
*/
package com.fluxtion.runtime.partition;
import com.fluxtion.runtime.event.Event;
import com.fluxtion.runtime.lifecycle.BatchHandler;
import com.fluxtion.runtime.lifecycle.EventHandler;
import com.fluxtion.runtime.lifecycle.Lifecycle;
import com.fluxtion.runtime.partition.LambdaReflection.SerializableFunction;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Supplier;
/**
* A simple event partitioner based on a single or multiple properties of an
* event. User register a creation function for an EventHandler and an optional
* initialiser that
*
* @author gregp
*/
public class Partitioner implements EventHandler, Lifecycle, BatchHandler {
private HashMap class2Function;
private HashMap class2MultiFunction;
private HashMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy