io.objectbox.query.QueryThreadLocal Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectbox-java Show documentation
Show all versions of objectbox-java Show documentation
ObjectBox is a fast NoSQL database for Objects
package io.objectbox.query;
/**
* A {@link ThreadLocal} that, given an original {@link Query} object,
* returns a {@link Query#copy() copy}, for each thread.
*/
public class QueryThreadLocal extends ThreadLocal> {
private final Query original;
/**
* See {@link QueryThreadLocal}.
*/
public QueryThreadLocal(Query original) {
this.original = original;
}
@Override
protected Query initialValue() {
return original.copy();
}
}