private void put(LocalInstance<AGGREGATOR, SAMPLE> q) {
        // Has to set registered before adding to the list. Otherwise, the
        // instance might be removed from the list, set as unregistered, and
        // then the local thread might happily remove that information. The Java
        // memory model is a guarantee for the minimum amount of visibility,
        // not a definition of the actual amount.
        q.setRegistered(true);
        synchronized (directoryLock) {
            directory.add(q);
        }
    }
Create an application specific copy of the AGGREGATOR for a thread.

@param current
           the AGGREGATOR instance to copy
@return a copy of the incoming parameter
vespajlib/src/main/java/com/yahoo/concurrent/ThreadLocalDirectory.java