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

org.axonframework.mongo.MongoTemplate Maven / Gradle / Ivy

There is a newer version: 4.0-M2
Show newest version
/*
 * Copyright (c) 2010-2017. Axon Framework
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.axonframework.mongo;

import com.mongodb.client.MongoCollection;
import org.bson.Document;

/**
 * Template object providing access to the collections necessary for the Mongo based components.
 */
public interface MongoTemplate {

    /**
     * Returns a reference to the collection containing the Tracking Tokens.
     *
     * @return MongoCollection containing the Tracking Tokens
     */
    MongoCollection trackingTokensCollection();

    /**
     * Returns a reference to the collection containing the events.
     *
     * @return MongoCollection containing the domain events
     */
    MongoCollection eventCollection();

    /**
     * Returns a reference to the collection containing the snapshot events.
     *
     * @return MongoCollection containing the snapshot events
     */
    MongoCollection snapshotCollection();

    /**
     * Returns a reference to the collection containing the saga instances.
     *
     * @return MongoCollection containing the sagas
     */
    MongoCollection sagaCollection();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy