de.intarsys.tools.valueholder.ThreadLocalValueHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
package de.intarsys.tools.valueholder;
public class ThreadLocalValueHolder implements IValueHolder {
final private ThreadLocal threadLocal = new ThreadLocal();
public T get() {
return threadLocal.get();
}
public T set(T value) {
T oldValue = threadLocal.get();
threadLocal.set(value);
return oldValue;
};
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy