Example usage for io.netty.util.internal PlatformDependent newConcurrentHashMap

List of usage examples for io.netty.util.internal PlatformDependent newConcurrentHashMap

Introduction

In this page you can find the example usage for io.netty.util.internal PlatformDependent newConcurrentHashMap.

Prototype

public static <K, V> ConcurrentMap<K, V> newConcurrentHashMap() 

Source Link

Document

Creates a new fastest ConcurrentMap implementation for the current platform.

Usage

From source file:com.corundumstudio.socketio.store.MemoryStoreFactory.java

License:Apache License

@Override
public <K, V> Map<K, V> createMap(String name) {
    return PlatformDependent.newConcurrentHashMap();
}

From source file:com.flysoloing.learning.network.netty.http2.helloworld.client.HttpResponseHandler.java

License:Apache License

public HttpResponseHandler() {
    // Use a concurrent map because we add and iterate from the main thread (just for the purposes of the example),
    // but Netty also does a get on the map when messages are received in a EventLoop thread.
    streamidPromiseMap = PlatformDependent.newConcurrentHashMap();
}

From source file:http.HTTPResponseHandler.java

License:Open Source License

public HTTPResponseHandler() {
    // Use a concurrent map because we add and iterate from the main thread
    streamIdPromiseMap = PlatformDependent.newConcurrentHashMap();
    streamIdResponseMap = PlatformDependent.newConcurrentHashMap();
}

From source file:org.ballerinalang.test.util.http2.HTTP2ResponseHandler.java

License:Open Source License

public HTTP2ResponseHandler() {
    // Use a concurrent map because we add and iterate from the main thread
    streamIdPromiseMap = PlatformDependent.newConcurrentHashMap();
    streamIdResponseMap = PlatformDependent.newConcurrentHashMap();
}

From source file:reactor.ipc.netty.resources.DefaultPoolResources.java

License:Open Source License

DefaultPoolResources(String name, BiFunction<Bootstrap, ChannelPoolHandler, ChannelPool> provider) {
    this.name = name;
    this.provider = provider;
    this.channelPools = PlatformDependent.newConcurrentHashMap();
}