/** * {@inheritDoc} */ public void putAll(final Map<? extends K, ? extends V> map) { for (final Entry<? extends K, ? extends V> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } }
public Map<Long, Long> create(final Object... entries) { final Object2ObjectHashMap<Long, Long> map = new Object2ObjectHashMap<>( entries.length * 2, Hashing.DEFAULT_LOAD_FACTOR, false); for (final Object o : entries) { @SuppressWarnings("unchecked") final Map.Entry<Long, Long> e = (Map.Entry<Long, Long>)o; map.put(e.getKey(), e.getValue()); } return map; }
private SendChannelEndpoint getOrCreateSendChannelEndpoint(final UdpChannel udpChannel) { SendChannelEndpoint channelEndpoint = findExistingSendChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.sendChannelEndpointSupplier().newInstance( udpChannel, SendChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); sendChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); senderProxy.registerSendChannelEndpoint(channelEndpoint); } return channelEndpoint; }
recordingSubscriptionMap.put(key, subscription); controlSession.sendOkResponse(correlationId, subscription.registrationId(), controlResponseProxy);
private ReceiveChannelEndpoint getOrCreateReceiveChannelEndpoint(final UdpChannel udpChannel) { ReceiveChannelEndpoint channelEndpoint = findExistingReceiveChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.receiveChannelEndpointSupplier().newInstance( udpChannel, new DataPacketDispatcher(ctx.driverConductorProxy(), receiverProxy.receiver()), ReceiveChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); receiveChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); receiverProxy.registerReceiveChannelEndpoint(channelEndpoint); } return channelEndpoint; }
recordingSubscriptionMap.put(key, subscription); controlSession.sendOkResponse(correlationId, subscription.registrationId(), controlResponseProxy);
/** * {@inheritDoc} */ public void putAll(final Map<? extends K, ? extends V> map) { for (final Entry<? extends K, ? extends V> entry : map.entrySet()) { put(entry.getKey(), entry.getValue()); } }
void logChange(final K key, final V value) { if (collector != null) { // Twitter Added newEntries.put(key, new ValueAndTimestamp<>(value, context.timestamp())); } }
private SendChannelEndpoint getOrCreateSendChannelEndpoint(final UdpChannel udpChannel) { SendChannelEndpoint channelEndpoint = findExistingSendChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.sendChannelEndpointSupplier().newInstance( udpChannel, SendChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); sendChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); senderProxy.registerSendChannelEndpoint(channelEndpoint); } return channelEndpoint; }
private SendChannelEndpoint getOrCreateSendChannelEndpoint(final UdpChannel udpChannel) { SendChannelEndpoint channelEndpoint = findExistingSendChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.sendChannelEndpointSupplier().newInstance( udpChannel, SendChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); sendChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); senderProxy.registerSendChannelEndpoint(channelEndpoint); } return channelEndpoint; }
private ReceiveChannelEndpoint getOrCreateReceiveChannelEndpoint(final UdpChannel udpChannel) { ReceiveChannelEndpoint channelEndpoint = findExistingReceiveChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.receiveChannelEndpointSupplier().newInstance( udpChannel, new DataPacketDispatcher(ctx.driverConductorProxy(), receiverProxy.receiver()), ReceiveChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); receiveChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); receiverProxy.registerReceiveChannelEndpoint(channelEndpoint); } return channelEndpoint; }
recordingSubscriptionMap.put(key, subscription); controlSession.sendOkResponse(correlationId, subscription.registrationId(), controlResponseProxy);
private ReceiveChannelEndpoint getOrCreateReceiveChannelEndpoint(final UdpChannel udpChannel) { ReceiveChannelEndpoint channelEndpoint = findExistingReceiveChannelEndpoint(udpChannel); if (null == channelEndpoint) { channelEndpoint = ctx.receiveChannelEndpointSupplier().newInstance( udpChannel, new DataPacketDispatcher(ctx.driverConductorProxy(), receiverProxy.receiver()), ReceiveChannelStatus.allocate(tempBuffer, countersManager, udpChannel.originalUriString()), ctx); receiveChannelEndpointByChannelMap.put(udpChannel.canonicalForm(), channelEndpoint); receiverProxy.registerReceiveChannelEndpoint(channelEndpoint); } return channelEndpoint; }
recordingSubscriptionMap.put(key, subscription); controlSession.sendOkResponse(correlationId, subscription.registrationId(), controlResponseProxy);