Refactor: Rename RequestManager to BlocksRequestManager

This commit is contained in:
Manfred Karrer 2018-03-08 10:06:37 -05:00
parent eca72f658f
commit d320346a03
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
5 changed files with 15 additions and 15 deletions

View File

@ -23,8 +23,8 @@ import io.bisq.common.app.AppModule;
import io.bisq.core.dao.blockchain.BsqBlockChain;
import io.bisq.core.dao.blockchain.BsqBlockChainChangeDispatcher;
import io.bisq.core.dao.blockchain.json.JsonBlockChainExporter;
import io.bisq.core.dao.node.BlocksRequestManager;
import io.bisq.core.dao.node.BsqNodeProvider;
import io.bisq.core.dao.node.RequestManager;
import io.bisq.core.dao.node.consensus.*;
import io.bisq.core.dao.node.full.FullNode;
import io.bisq.core.dao.node.full.FullNodeExecutor;
@ -51,7 +51,7 @@ public class DaoModule extends AppModule {
protected void configure() {
bind(DaoManager.class).in(Singleton.class);
bind(RequestManager.class).in(Singleton.class);
bind(BlocksRequestManager.class).in(Singleton.class);
bind(RpcService.class).in(Singleton.class);
bind(FullNodeExecutor.class).in(Singleton.class);
bind(LiteNodeExecutor.class).in(Singleton.class);

View File

@ -24,7 +24,7 @@ import java.util.*;
import java.util.stream.Collectors;
@Slf4j
public class RequestManager implements MessageListener, ConnectionListener, PeerManager.Listener {
public class BlocksRequestManager implements MessageListener, ConnectionListener, PeerManager.Listener {
private static final long RETRY_DELAY_SEC = 10;
private static final long CLEANUP_TIMER = 120;
@ -73,7 +73,7 @@ public class RequestManager implements MessageListener, ConnectionListener, Peer
///////////////////////////////////////////////////////////////////////////////////////////
@Inject
public RequestManager(NetworkNode networkNode,
public BlocksRequestManager(NetworkNode networkNode,
PeerManager peerManager,
Broadcaster broadcaster,
SeedNodesRepository seedNodesRepository,

View File

@ -48,7 +48,7 @@ public abstract class BsqNode {
protected final String genesisTxId;
protected final int genesisBlockHeight;
@SuppressWarnings("WeakerAccess")
protected final RequestManager requestManager;
protected final BlocksRequestManager requestManager;
@Getter
protected boolean parseBlockchainComplete;
@SuppressWarnings("WeakerAccess")
@ -63,7 +63,7 @@ public abstract class BsqNode {
public BsqNode(P2PService p2PService,
BsqBlockChain bsqBlockChain,
FeeService feeService,
RequestManager requestManager) {
BlocksRequestManager requestManager) {
this.p2PService = p2PService;
this.bsqBlockChain = bsqBlockChain;

View File

@ -25,8 +25,8 @@ import io.bisq.core.dao.blockchain.BsqBlockChainListener;
import io.bisq.core.dao.blockchain.exceptions.BlockNotConnectingException;
import io.bisq.core.dao.blockchain.json.JsonBlockChainExporter;
import io.bisq.core.dao.blockchain.vo.BsqBlock;
import io.bisq.core.dao.node.BlocksRequestManager;
import io.bisq.core.dao.node.BsqNode;
import io.bisq.core.dao.node.RequestManager;
import io.bisq.core.provider.fee.FeeService;
import io.bisq.network.p2p.P2PService;
import lombok.extern.slf4j.Slf4j;
@ -53,7 +53,7 @@ public class FullNode extends BsqNode {
BsqBlockChain bsqBlockChain,
JsonBlockChainExporter jsonBlockChainExporter,
FeeService feeService,
RequestManager requestManager) {
BlocksRequestManager requestManager) {
super(p2PService,
bsqBlockChain,
feeService,

View File

@ -24,8 +24,8 @@ import io.bisq.core.dao.blockchain.BsqBlockChain;
import io.bisq.core.dao.blockchain.BsqBlockChainListener;
import io.bisq.core.dao.blockchain.exceptions.BlockNotConnectingException;
import io.bisq.core.dao.blockchain.vo.BsqBlock;
import io.bisq.core.dao.node.BlocksRequestManager;
import io.bisq.core.dao.node.BsqNode;
import io.bisq.core.dao.node.RequestManager;
import io.bisq.core.dao.node.messages.GetBsqBlocksResponse;
import io.bisq.core.dao.node.messages.NewBsqBlockBroadcastMessage;
import io.bisq.core.provider.fee.FeeService;
@ -57,7 +57,7 @@ public class LiteNode extends BsqNode {
LiteNodeExecutor bsqLiteNodeExecutor,
BsqBlockChain bsqBlockChain,
FeeService feeService,
RequestManager requestManager) {
BlocksRequestManager requestManager) {
super(p2PService,
bsqBlockChain,
feeService,
@ -84,7 +84,7 @@ public class LiteNode extends BsqNode {
protected void onP2PNetworkReady() {
super.onP2PNetworkReady();
requestManager.addListener(new RequestManager.Listener() {
requestManager.addListener(new BlocksRequestManager.Listener() {
@Override
public void onRequestedBlocksReceived(GetBsqBlocksResponse getBsqBlocksResponse) {
LiteNode.this.onRequestedBlocksReceived(new ArrayList<>(getBsqBlocksResponse.getBsqBlocks()));