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

com.eightkdata.mongowp.server.api.SafeRequestProcessor Maven / Gradle / Ivy

There is a newer version: 0.50.0
Show newest version
package com.eightkdata.mongowp.server.api;

import com.eightkdata.mongowp.messages.request.*;
import com.eightkdata.mongowp.messages.response.ReplyMessage;
import com.eightkdata.mongowp.server.api.impl.UpdateOpResult;
import com.eightkdata.mongowp.server.api.pojos.QueryRequest;
import com.eightkdata.mongowp.server.callback.WriteOpResult;
import com.eightkdata.mongowp.exceptions.CommandNotSupportedException;
import com.eightkdata.mongowp.exceptions.MongoException;
import com.google.common.util.concurrent.ListenableFuture;
import javax.annotation.Nonnull;

/**
 *
 */
public interface SafeRequestProcessor extends CommandsExecutor{

    public void onConnectionActive(Connection connection);

    public void onConnectionInactive(Connection connection);

    @Nonnull
    public ReplyMessage getMore(Request request, GetMoreMessage getMoreMessage)
            throws MongoException;

    public ListenableFuture killCursors(Request request, KillCursorsMessage killCursorsMessage)
            throws MongoException;

    public CommandsLibrary getCommandsLibrary();

    @Override
    public  CommandReply execute(
            Command command,
            CommandRequest request) throws MongoException, CommandNotSupportedException;

    @Nonnull
    public ReplyMessage query(Request request, QueryRequest queryMessage)
            throws MongoException;

    public ListenableFuture insert(Request request, InsertMessage insertMessage)
            throws MongoException;

    public ListenableFuture update(Request request, UpdateMessage deleteMessage)
            throws MongoException;

    public ListenableFuture delete(Request request, DeleteMessage deleteMessage)
            throws MongoException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy