Search in sources :

Example 1 with PrepRequestProcessor

use of org.apache.zookeeper.server.PrepRequestProcessor in project zookeeper by apache.

the class ReadOnlyZooKeeperServer method setupRequestProcessors.

@Override
protected void setupRequestProcessors() {
    RequestProcessor finalProcessor = new FinalRequestProcessor(this);
    RequestProcessor prepProcessor = new PrepRequestProcessor(this, finalProcessor);
    ((PrepRequestProcessor) prepProcessor).start();
    firstProcessor = new ReadOnlyRequestProcessor(this, prepProcessor);
    ((ReadOnlyRequestProcessor) firstProcessor).start();
}
Also used : PrepRequestProcessor(org.apache.zookeeper.server.PrepRequestProcessor) FinalRequestProcessor(org.apache.zookeeper.server.FinalRequestProcessor) RequestProcessor(org.apache.zookeeper.server.RequestProcessor) FinalRequestProcessor(org.apache.zookeeper.server.FinalRequestProcessor) PrepRequestProcessor(org.apache.zookeeper.server.PrepRequestProcessor)

Example 2 with PrepRequestProcessor

use of org.apache.zookeeper.server.PrepRequestProcessor in project zookeeper by apache.

the class LeaderZooKeeperServer method setupRequestProcessors.

@Override
protected void setupRequestProcessors() {
    RequestProcessor finalProcessor = new FinalRequestProcessor(this);
    RequestProcessor toBeAppliedProcessor = new Leader.ToBeAppliedRequestProcessor(finalProcessor, getLeader());
    commitProcessor = new CommitProcessor(toBeAppliedProcessor, Long.toString(getServerId()), false, getZooKeeperServerListener());
    commitProcessor.start();
    ProposalRequestProcessor proposalProcessor = new ProposalRequestProcessor(this, commitProcessor);
    proposalProcessor.initialize();
    prepRequestProcessor = new PrepRequestProcessor(this, proposalProcessor);
    prepRequestProcessor.start();
    firstProcessor = new LeaderRequestProcessor(this, prepRequestProcessor);
    setupContainerManager();
}
Also used : PrepRequestProcessor(org.apache.zookeeper.server.PrepRequestProcessor) FinalRequestProcessor(org.apache.zookeeper.server.FinalRequestProcessor) RequestProcessor(org.apache.zookeeper.server.RequestProcessor) FinalRequestProcessor(org.apache.zookeeper.server.FinalRequestProcessor) PrepRequestProcessor(org.apache.zookeeper.server.PrepRequestProcessor)

Aggregations

FinalRequestProcessor (org.apache.zookeeper.server.FinalRequestProcessor)2 PrepRequestProcessor (org.apache.zookeeper.server.PrepRequestProcessor)2 RequestProcessor (org.apache.zookeeper.server.RequestProcessor)2