Skip to content

Commit

Permalink
Identify catchup server address as catchupServer.
Browse files Browse the repository at this point in the history
  • Loading branch information
apcj committed Jul 22, 2016
1 parent 5556995 commit 8374b99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -24,14 +24,14 @@
public class CoreAddresses
{
private final AdvertisedSocketAddress raftServer;
private final AdvertisedSocketAddress coreServer;
private final AdvertisedSocketAddress catchupServer;
private final AdvertisedSocketAddress boltServer;

public CoreAddresses( AdvertisedSocketAddress raftServer, AdvertisedSocketAddress coreServer,
public CoreAddresses( AdvertisedSocketAddress raftServer, AdvertisedSocketAddress catchupServer,
AdvertisedSocketAddress boltServer )
{
this.raftServer = raftServer;
this.coreServer = coreServer;
this.catchupServer = catchupServer;
this.boltServer = boltServer;
}

Expand All @@ -40,9 +40,9 @@ public AdvertisedSocketAddress getRaftServer()
return raftServer;
}

public AdvertisedSocketAddress getCoreServer()
public AdvertisedSocketAddress getCatchupServer()
{
return coreServer;
return catchupServer;
}

public AdvertisedSocketAddress getBoltServer()
Expand Down
Expand Up @@ -51,7 +51,7 @@ public void send( MemberId to, Message message )
try
{
CoreAddresses coreAddresses = discoveryService.currentTopology().coreAddresses( to );
outbound.send( coreAddresses.getCoreServer(), message );
outbound.send( coreAddresses.getCatchupServer(), message );
}
catch ( NoKnownAddressesException e )
{
Expand All @@ -65,7 +65,7 @@ public void send( MemberId to, Collection<Message> messages )
try
{
CoreAddresses coreAddresses = discoveryService.currentTopology().coreAddresses( to );
outbound.send( coreAddresses.getCoreServer(), messages );
outbound.send( coreAddresses.getCatchupServer(), messages );
}
catch ( NoKnownAddressesException e )
{
Expand Down
Expand Up @@ -115,7 +115,7 @@ public void shouldStoreMemberIdentityAndAddressesAsMemberAttributes() throws Exc
// then
assertEquals( memberId, extracted.first() );
CoreAddresses addresses = extracted.other();
assertEquals( new AdvertisedSocketAddress( "tx:1001" ), addresses.getCoreServer() );
assertEquals( new AdvertisedSocketAddress( "tx:1001" ), addresses.getCatchupServer() );
assertEquals( new AdvertisedSocketAddress( "raft:2001" ), addresses.getRaftServer() );
assertEquals( new AdvertisedSocketAddress( "bolt:3001" ), addresses.getBoltServer() );
}
Expand Down Expand Up @@ -148,7 +148,7 @@ public void shouldCollectMembersAsAMap() throws Exception
for ( int i = 0; i < 5; i++ )
{
CoreAddresses coreAddresses = coreMemberMap.get( coreMembers.get( i ) );
assertEquals( new AdvertisedSocketAddress( "tx:" + (i + 1 )), coreAddresses.getCoreServer() );
assertEquals( new AdvertisedSocketAddress( "tx:" + (i + 1 )), coreAddresses.getCatchupServer() );
assertEquals( new AdvertisedSocketAddress( "raft:" + (i + 1 )), coreAddresses.getRaftServer() );
assertEquals( new AdvertisedSocketAddress( "bolt:" + (i + 1 )), coreAddresses.getBoltServer() );
}
Expand Down

0 comments on commit 8374b99

Please sign in to comment.