Skip to content

Commit

Permalink
poolmanager: make RendezvousPoolManagerHandler#backendFor private
Browse files Browse the repository at this point in the history
Motivation:
- never used by other components
- exposes implementation details

Modification:
Make RendezvousPoolManagerHandler#backendFor private. Remove unused
method.

Result:
less unused code + better encapsulation.

Acked-by: Lea Morschel
Acked-by: Paul Millar
Target: master
Require-book: no
Require-notes: no
  • Loading branch information
kofemann committed Jan 21, 2020
1 parent bff16d6 commit 2328947
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public RendezvousPoolManagerHandler(CellAddressCore serviceAddress, List<CellAdd
this.backends = backends;
}

public CellAddressCore backendFor(PnfsId pnfsId)
private CellAddressCore backendFor(PnfsId pnfsId)
{
Iterator<CellAddressCore> iterator = backends.iterator();
CellAddressCore address = iterator.next();
Expand All @@ -85,19 +85,14 @@ public CellAddressCore backendFor(PnfsId pnfsId)
return address;
}

public CellAddressCore backendFor(PoolManagerMessage msg)
private CellAddressCore backendFor(PoolManagerMessage msg)
{
if (msg instanceof PoolMgrGetPoolMsg) {
return backendFor(((PoolMgrGetPoolMsg) msg).getFileAttributes().getPnfsId());
}
return serviceAddress;
}

public CellAddressCore backendFor(PoolIoFileMessage msg)
{
return backendFor(msg.getFileAttributes().getPnfsId());
}

private static int hash(PnfsId pnfsId, CellAddressCore address)
{
return Hashing.murmur3_32().newHasher()
Expand Down

0 comments on commit 2328947

Please sign in to comment.