Immutant 2.0.0-alpha1

The public API for Immutant.


Create, manage and manipulate Infinispan caches in a data grid


Require this to extend org.infinispan.Cache to the core.cache CacheProtocol

Public variables and functions:


    Use an Infinispan cache as a PluggableMemoization from core.memoize

    Public variables and functions:


    Common codecs used when [de]serializing data structures.

    Public variables and functions:


    Defines AsPeriod and AsTime protocols for schedule specifications

    Public variables and functions:


    Asynchronous, highly-available services that share the lifecycle of your application.

    Public variables and functions:


    Easily publish and receive messages containing any type of nested data structure to dynamically-created queues and topics.


    Utilities specific to HornetQ


    Provides functions for creating and managing pipelines. A pipeline is a composition of functions ("steps"), where each function is passed the result of the previous function, dereferenced if needed. It is built on top of Immutant's messaging subsystem, allowing each step to have multiple processing threads, and to be automatically load balanced across a cluster.

    The pipeline function takes a unique (within the scope of the application) name, one or more single-arity functions, and optional kwarg options, returning a function that places its argument onto the pipeline when called. The resulting pipeline-fn optionally returns a delay that can be used to retrieve the result of the pipeline execution.

    Each function can be optionally be wrapped with metadata that provides options for how that particular function is handled (see the 'step' fn below).


    (require '[immutant.pipeline :as pl])
    (defn calculate-foo [m]
      (assoc m :foo value))
    (defn save-data [m]
    ;; create a pipeline
    (defonce foo-pipeline
      (pl/pipeline "foo" ;; pipelines must be named
        (pl/step calculate-foo :concurrency 5) ;; run this step with 5 threads
        (pl/step #(update-in % [:bar] + (:foo %)) :name :update-bar) ;; give this step a name
        save-data ;; a 'vanilla' step
        :concurrency 2 ;; run all steps with 2 threads (unless overridden)
        :error-handler (fn [ex m] ;; do something special with errors, and retry
                         (pl/*pipeline* m :step *current-step*))))
    ;; put data onto the front pipeline
    (foo-pipeline {:bar 1 :ham "biscuit"})
    ;; put data onto the pipeline at a given step
    (foo-pipeline {:bar 1 :foo 42 :ham "gravy"} :step :update-bar)
    ;; get the result
    (deref (foo-pipeline {:bar 1 :ham "biscuit"}) 1000 ::timeout!)
    ;; optional - it will automatically be stopped on undeploy
    (pl/stop foo-pipeline)


    Schedule jobs for execution

    Public variables and functions:


    Adapts the clj-time library, which must be included among your app's dependencies to load this namespace

    Public variables and functions:


    Various utility functions.


    Serve web requests using Ring handlers, Servlets, or Undertow HttpHandlers

    Public variables and functions:


    Ring middleware useful with immutant.web

    Public variables and functions:


    Advanced options specific to the Undertow web server used by Immutant

    Public variables and functions:


    Provides for the creation of asynchronous WebSocket services

    Public variables and functions:


    Utility functions only useful within a WildFly container.