All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.objectbox.query.QueryThreadLocal Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy