All Downloads are FREE. Search and download functionalities are using the official Maven repository.

boguspackage.BogusEvent Maven / Gradle / Ivy

There is a newer version: 0.4.6
Show newest version
/**
 * Copyright (c) 2016, All Contributors (see CONTRIBUTORS file)
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package boguspackage;

import com.eventsourcing.StandardEvent;
import com.eventsourcing.hlc.HybridTimestamp;
import com.eventsourcing.index.Index;
import com.eventsourcing.index.SimpleIndex;
import lombok.Builder;
import lombok.Getter;
import lombok.experimental.Accessors;

import static com.eventsourcing.index.IndexEngine.IndexFeature.EQ;
import static com.eventsourcing.index.IndexEngine.IndexFeature.SC;

@Accessors(fluent = true)
public class BogusEvent extends StandardEvent {
    @Getter
    private final String string;

    @Index({EQ, SC})
    public static SimpleIndex ATTR = BogusEvent::string;

    @Builder
    public BogusEvent(HybridTimestamp timestamp, String string) {
        super(timestamp);
        this.string = string == null ? "bogus" : string;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy