public static void clean() { WEB_CONTEXT_THREAD_LOCAL.remove(); blade = null; }
public static void clean() { WEB_CONTEXT_THREAD_LOCAL.remove(); blade = null; }
public static void remove() { WEB_CONTEXT_THREAD_LOCAL.remove(); }
public static void remove() { WEB_CONTEXT_THREAD_LOCAL.remove(); }
static void remove() { context.remove(); }
/** * Set the value for the specified thread local map. The specified thread local map must be for the current thread. */ public final void set(InternalThreadLocalMap threadLocalMap, V value) { if (value != InternalThreadLocalMap.UNSET) { setKnownNotUnset(threadLocalMap, value); } else { remove(threadLocalMap); } }
/** * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); }
/** * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); }
/** * Set the value for the specified thread local map. The specified thread local map must be for the current thread. */ public final void set(InternalThreadLocalMap threadLocalMap, V value) { if (value != InternalThreadLocalMap.UNSET) { setKnownNotUnset(threadLocalMap, value); } else { remove(threadLocalMap); } }
/** * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); }
/** * Set the value for the specified thread local map. The specified thread local map must be for the current thread. */ public final void set(InternalThreadLocalMap threadLocalMap, V value) { if (value != InternalThreadLocalMap.UNSET) { setKnownNotUnset(threadLocalMap, value); } else { remove(threadLocalMap); } }
/** * Set the value for the current thread. */ public final void set(V value) { if (value != InternalThreadLocalMap.UNSET) { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.get(); if (setKnownNotUnset(threadLocalMap, value)) { registerCleaner(threadLocalMap); } } else { remove(); } }
/** * Creates a new instance. * * @param name the name of this {@link TrustManagerFactory} */ protected SimpleTrustManagerFactory(String name) { super(CURRENT_SPI.get(), PROVIDER, name); CURRENT_SPI.get().init(this); CURRENT_SPI.remove(); if (name == null) { throw new NullPointerException("name"); } }
/** * Removes all {@link FastThreadLocal} variables bound to the current thread. This operation is useful when you * are in a container environment, and you don't want to leave the thread local variables in the threads you do not * manage. */ public static void removeAll() { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet(); if (threadLocalMap == null) { return; } try { Object v = threadLocalMap.indexedVariable(variablesToRemoveIndex); if (v != null && v != InternalThreadLocalMap.UNSET) { @SuppressWarnings("unchecked") Set<FastThreadLocal<?>> variablesToRemove = (Set<FastThreadLocal<?>>) v; FastThreadLocal<?>[] variablesToRemoveArray = variablesToRemove.toArray(new FastThreadLocal[0]); for (FastThreadLocal<?> tlv: variablesToRemoveArray) { tlv.remove(threadLocalMap); } } } finally { InternalThreadLocalMap.remove(); } }
/** * Set the value for the current thread. */ public final void set(V value) { if (value != InternalThreadLocalMap.UNSET) { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.get(); if (setKnownNotUnset(threadLocalMap, value)) { registerCleaner(threadLocalMap); } } else { remove(); } }
/** * Creates a new instance. * * @param name the name of this {@link TrustManagerFactory} */ protected SimpleTrustManagerFactory(String name) { super(CURRENT_SPI.get(), PROVIDER, name); CURRENT_SPI.get().init(this); CURRENT_SPI.remove(); if (name == null) { throw new NullPointerException("name"); } }
/** * Removes all {@link FastThreadLocal} variables bound to the current thread. This operation is useful when you * are in a container environment, and you don't want to leave the thread local variables in the threads you do not * manage. */ public static void removeAll() { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet(); if (threadLocalMap == null) { return; } try { Object v = threadLocalMap.indexedVariable(variablesToRemoveIndex); if (v != null && v != InternalThreadLocalMap.UNSET) { @SuppressWarnings("unchecked") Set<FastThreadLocal<?>> variablesToRemove = (Set<FastThreadLocal<?>>) v; FastThreadLocal<?>[] variablesToRemoveArray = variablesToRemove.toArray(new FastThreadLocal[0]); for (FastThreadLocal<?> tlv: variablesToRemoveArray) { tlv.remove(threadLocalMap); } } } finally { InternalThreadLocalMap.remove(); } }
/** * Set the value for the current thread. */ public final void set(V value) { if (value != InternalThreadLocalMap.UNSET) { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.get(); if (setKnownNotUnset(threadLocalMap, value)) { registerCleaner(threadLocalMap); } } else { remove(); } }
/** * Removes all {@link FastThreadLocal} variables bound to the current thread. This operation is useful when you * are in a container environment, and you don't want to leave the thread local variables in the threads you do not * manage. */ public static void removeAll() { InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet(); if (threadLocalMap == null) { return; } try { Object v = threadLocalMap.indexedVariable(variablesToRemoveIndex); if (v != null && v != InternalThreadLocalMap.UNSET) { @SuppressWarnings("unchecked") Set<FastThreadLocal<?>> variablesToRemove = (Set<FastThreadLocal<?>>) v; FastThreadLocal<?>[] variablesToRemoveArray = variablesToRemove.toArray(new FastThreadLocal[0]); for (FastThreadLocal<?> tlv: variablesToRemoveArray) { tlv.remove(threadLocalMap); } } } finally { InternalThreadLocalMap.remove(); } }
/** * Sets the value to uninitialized; a proceeding call to get() will trigger a call to initialValue(). */ public final void remove() { remove(InternalThreadLocalMap.getIfSet()); }