CrossClj

0.1.4 docs

SourceDocs



RECENT
    VARS
    ->AssociativeCache
    ->Caches
    ->CountCache
    ->LastNCache
    configure-cache-mappings
    default-cache-factories
    default-cache-server
    get-cache
    get-tuple-cache
    map->AssociativeCache
    map->Caches
    map->CountCache
    map->LastNCache
    new-caches
    record!
    reset-caches!

    « Index of all namespaces of this project

     This namespace provides the 3 default TupleCache implementations:
      * associative -- simple kv mapping
      * lastn -- last N  values are retained per key
      * count -- each occurrence of a [pred subj obj] is counted, and the associated times may be retained as a sequence.
    
    New cache types can be introduced by extending the TupleCache protocol
    The CacheServer protocol provides a (mutable) cache backing store
    
    The Caches type is a component encapsulating the cache configuration and the set of configured caches in the system.
    The new-caches factory function produces a Caches instance given a cache configuration map, a CacheServer instance, 
    and optionally a map of extended cache factory functions for custom cache types.
    
    TODO: 
    * Use RRB tree to implement proper distinct last-n
    (->AssociativeCache backing-map)
    Positional factory function for class streamsum.caches.AssociativeCache.
    
    (->Caches cache-config cache-server cache-factory-fns caches cache-update-fns)
    Positional factory function for class streamsum.caches.Caches.
    
    (->CountCache backing-map)
    Positional factory function for class streamsum.caches.CountCache.
    
    (->LastNCache backing-map buf-size)
    Positional factory function for class streamsum.caches.LastNCache.
    
    (configure-cache-mappings cache-config cache-server ext-factory-fns)
    return a map from cache-key to TupleCache instance for all configured caches
    
    (default-cache-server)
    An in-proces CacheServer implemented using Java HashMaps
    
    (get-cache caches-component cache-key)
    Return the backing Map for the cache specified by cache-key
    
    (get-tuple-cache caches-component cache-key)
    Return the TupleCache instance for the given cache-key
    
    (map->AssociativeCache m__7585__auto__)
    Factory function for class streamsum.caches.AssociativeCache, taking a map of keywords to field values.
    
    (map->Caches m__7585__auto__)
    Factory function for class streamsum.caches.Caches, taking a map of keywords to field values.
    
    (map->CountCache m__7585__auto__)
    Factory function for class streamsum.caches.CountCache, taking a map of keywords to field values.
    
    (map->LastNCache m__7585__auto__)
    Factory function for class streamsum.caches.LastNCache, taking a map of keywords to field values.
    
    (new-caches cache-config cache-server & [cache-factory-fns])
    Factory function for Caches component
    
    (record! caches-component metrics-component [cache-key _ _ _ :as tuple])
    The record function takes a 4-tuple of the form [cache-key key val time] and updates the appropriate cache based on the value of cache-key.
    Returns a tuple to be placed on the cache persistence queue of the form [cache-key key val' time], where val' is the
    value associated with key in the cache.  For some cache update functions val' may be different than the original tuple val.
    (reset-caches! caches-component)