Class ProcessConstraintEvaluator.CachedConstraints

java.lang.Object
neqsim.process.util.optimizer.ProcessConstraintEvaluator.CachedConstraints
All Implemented Interfaces:
Serializable
Enclosing class:
ProcessConstraintEvaluator

public static class ProcessConstraintEvaluator.CachedConstraints extends Object implements Serializable
Public cached constraints class for external use and testing.
Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • valid

      private boolean valid
    • flowRate

      private double flowRate
    • timestamp

      private long timestamp
    • ttlMillis

      private long ttlMillis
    • cachedResults

      private Map<String,Double> cachedResults
  • Constructor Details

    • CachedConstraints

      public CachedConstraints()
      Default constructor.
  • Method Details

    • isValid

      public boolean isValid()
      Checks if cache is valid.
      Returns:
      true if valid
    • setValid

      public void setValid(boolean valid)
      Sets validity flag.
      Parameters:
      valid - validity status
    • getFlowRate

      public double getFlowRate()
      Gets the cached flow rate.
      Returns:
      flow rate
    • setFlowRate

      public void setFlowRate(double flowRate)
      Sets the flow rate.
      Parameters:
      flowRate - flow rate
    • getTimestamp

      public long getTimestamp()
      Gets the timestamp.
      Returns:
      timestamp in milliseconds
    • setTimestamp

      public void setTimestamp(long timestamp)
      Sets the timestamp.
      Parameters:
      timestamp - timestamp in milliseconds
    • getTtlMillis

      public long getTtlMillis()
      Gets the TTL.
      Returns:
      TTL in milliseconds
    • setTtlMillis

      public void setTtlMillis(long ttlMillis)
      Sets the TTL.
      Parameters:
      ttlMillis - TTL in milliseconds
    • getCachedResults

      public Map<String,Double> getCachedResults()
      Gets the cached results.
      Returns:
      map of cached results
    • invalidate

      public void invalidate()
      Invalidates the cache.
    • isExpired

      public boolean isExpired()
      Checks if cache is expired.
      Returns:
      true if expired