@Override public V get(final Object key) { return get(((Long) key).longValue()); }
@Override public V get(final Object key) { return get(((Long) key).longValue()); }
/** * Retrieve a value from the map. * * @param keyPartA for the key * @param keyPartB for the key * @return value matching the key if found or null if not found. */ public V get(final int keyPartA, final int keyPartB) { final long key = compoundKey(keyPartA, keyPartB); return map.get(key); }
/** * Retrieve a value from the map. * * @param keyPartA for the key * @param keyPartB for the key * @return value matching the key if found or null if not found. */ public V get(final int keyPartA, final int keyPartB) { final long key = compoundKey(keyPartA, keyPartB); return map.get(key); }
/** * Get a value for a given key, or if it does ot exist then default the value via a {@link LongFunction} * and put it in the map. * * @param key to search on. * @param mappingFunction to provide a value if the get returns null. * @return the value if found otherwise the default. */ public V computeIfAbsent(final long key, final LongFunction<? extends V> mappingFunction) { checkNotNull(mappingFunction, "mappingFunction cannot be null"); V value = get(key); if (value == null) { value = mappingFunction.apply(key); if (value != null) { put(key, value); } } return value; }
/** * Get a value for a given key, or if it does ot exist then default the value via a {@link LongFunction} * and put it in the map. * * @param key to search on. * @param mappingFunction to provide a value if the get returns null. * @return the value if found otherwise the default. */ public V computeIfAbsent(final long key, final LongFunction<? extends V> mappingFunction) { checkNotNull(mappingFunction, "mappingFunction cannot be null"); V value = get(key); if (value == null) { value = mappingFunction.apply(key); if (value != null) { put(key, value); } } return value; }
builder.append(message.buffer(), 0, message.getFrameLength()); } else { BufferBuilder builder = builderBySessionIdMap.get(message.getCorrelationId()); if (builder.position() == 0) { throw new IllegalStateException();
builder.append(message.buffer(), 0, message.getFrameLength()); } else { BufferBuilder builder = builderBySessionIdMap.get(message.getCorrelationId()); if (builder.position() == 0) { throw new IllegalStateException();