io.deephaven.engine.table.impl.locations.impl.FunctionConsistencyMonitor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.engine.table.impl.locations.impl;
import io.deephaven.util.SafeCloseable;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;
public class FunctionConsistencyMonitor {
/**
* If a user function returns null, we store this value; which enables us to return null for real and distinguish
* from a null because the function has not been called yet.
*/
private static final Object NULL_SENTINEL_OBJECT = new Object();
/**
* How many functions have been registered with this instance?
*/
private final AtomicInteger functionCount = new AtomicInteger(0);
/**
* The currentValues, initialized by the {@link #startConsistentBlock()} when performing a series of computations.
*/
private final ThreadLocal
© 2015 - 2024 Weber Informatics LLC | Privacy Policy