use of games.strategy.net.GUID in project triplea by triplea-game.
the class UnifiedMessenger method messengerInvalid.
private void messengerInvalid() {
synchronized (pendingLock) {
for (final GUID id : pendingInvocations.keySet()) {
final CountDownLatch latch = pendingInvocations.remove(id);
latch.countDown();
results.put(id, new RemoteMethodCallResults(new ConnectionLostException("Connection Lost")));
}
}
}
use of games.strategy.net.GUID in project triplea by triplea-game.
the class LobbyGameController method connectionLost.
private void connectionLost(final INode to) {
final List<GUID> removed = new ArrayList<>();
synchronized (mutex) {
final Iterator<GUID> keys = allGames.keySet().iterator();
while (keys.hasNext()) {
final GUID key = keys.next();
final GameDescription game = allGames.get(key);
if (game.getHostedBy().equals(to)) {
keys.remove();
removed.add(key);
}
}
}
for (final GUID guid : removed) {
broadcaster.gameRemoved(guid);
}
}
Aggregations