org.nustaq.reallive.query.CompiledQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reallive Show documentation
Show all versions of reallive Show documentation
persistent inmemory datagrid based on kontraktor
package org.nustaq.reallive.query;
import org.nustaq.reallive.api.RLHashIndexPredicate;
import java.io.Serializable;
/**
* Created by ruedi on 28/08/15.
*/
public class CompiledQuery implements Serializable {
RLSupplier compiled;
EvalContext[] ref;
RLHashIndexPredicate hashIndex;
public CompiledQuery(RLSupplier compiled, EvalContext[] ref) {
this.compiled = compiled;
this.ref = ref;
}
public Value evaluate( EvalContext rec ) {
ref[0] = rec;
return compiled.get();
}
public RLHashIndexPredicate getHashIndex() {
return hashIndex;
}
public CompiledQuery hashIndex(RLHashIndexPredicate h) {
hashIndex = h;
return this;
}
}