@Override public SpdzInputMask getNextInputMask(int towardsPlayerId) { ensureInitialized(); ArrayDeque<InputMask> inputMasks = masks.get(towardsPlayerId); if (inputMasks.isEmpty()) { logger.trace("Getting another mask batch"); inputMasks.addAll(mascot.getInputMasks(towardsPlayerId, batchSize)); logger.trace("Got another mask batch"); } return MascotFormatConverter.toSpdzInputMask(inputMasks.pop()); }