org.zodiac.sdk.simplenetty.concurrent.FutureHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zodiac-sdk-nio Show documentation
Show all versions of zodiac-sdk-nio Show documentation
Zodiac SDK NIO2(New Non-Blocking IO)
package org.zodiac.sdk.simplenetty.concurrent;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.zodiac.sdk.simplenetty.core.EventExecutor;
public class FutureHolder {
private static Map map = new ConcurrentHashMap<>();
public static void put(EventExecutor eventExecutor, AbstractChannelFuture future) {
map.put(eventExecutor, future);
}
public static AbstractChannelFuture get(EventExecutor eventExecutor) {
return map.get(eventExecutor);
}
public static void clear() {
map.clear();
}
}