Class Tuple1.Cache

java.lang.Object
tools.refinery.store.tuple.Tuple1.Cache
Enclosing class:
Tuple1

public static class Tuple1.Cache extends Object
This class uses safe double-checked locking, see Safe Publication and Safe Initialization in Java for details.

This class implements the singleton pattern to ensure only a single cache exists. This is thread-safe because of the locking of the cache.

  • Field Details

  • Method Details

    • reset

      public void reset()
    • getOrCreate

      public Tuple1 getOrCreate(int value)