/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
/** * Returns {@code true} if and only if this thread-local variable is set. */ public final boolean isSet() { return isSet(InternalThreadLocalMap.getIfSet()); }
@Override protected void onRemoval(Stack<T> value) { // Let us remove the WeakOrderQueue from the WeakHashMap directly if its safe to remove some overhead if (value.threadRef.get() == Thread.currentThread()) { if (DELAYED_RECYCLED.isSet()) { DELAYED_RECYCLED.get().remove(value); } } } };
@Override public EventLoop next() { if (localLoop.isSet()) { return localLoop.get(); } return eventLoopGroup.next(); }
@Override public EventLoop next() { if (localLoop.isSet()) { return localLoop.get(); } return eventLoopGroup.next(); }
ColocatedEventLoopGroup(EventLoopGroup eventLoopGroup) { this.eventLoopGroup = eventLoopGroup; for (EventExecutor ex : eventLoopGroup) { if (ex instanceof EventLoop) { ex.submit(() -> { if (!localLoop.isSet()) { localLoop.set((EventLoop) ex); } }); } } }
@Override public EventLoop next() { if (localLoop.isSet()) { return localLoop.get(); } return eventLoopGroup.next(); }
ColocatedEventLoopGroup(EventLoopGroup eventLoopGroup) { this.eventLoopGroup = eventLoopGroup; for (EventExecutor ex : eventLoopGroup) { if (ex instanceof EventLoop) { ex.submit(() -> { if (!localLoop.isSet()) { localLoop.set((EventLoop) ex); } }); } } }
ColocatedEventLoopGroup(EventLoopGroup eventLoopGroup) { this.eventLoopGroup = eventLoopGroup; for (EventExecutor ex : eventLoopGroup) { if (ex instanceof EventLoop) { ex.submit(() -> { if (!localLoop.isSet()) { localLoop.set((EventLoop) ex); } }); } } }
@Override public EventLoop next() { if (localLoop.isSet()) { return localLoop.get(); } return eventLoopGroup.next(); }
public ColocatedEventLoopGroup(EventLoopGroup eventLoopGroup) { this.eventLoopGroup = eventLoopGroup; for (EventExecutor ex : eventLoopGroup) { if (ex instanceof EventLoop) { ex.submit(() -> { if (!localLoop.isSet()) { localLoop.set((EventLoop) ex); } }); } } }