Class IgniteCacheEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @UriEndpoint(firstVersion="2.17.0",
                 scheme="ignite-cache",
                 title="Ignite Cache",
                 syntax="ignite-cache:cacheName",
                 category={CACHE,DATAGRID})
    public class IgniteCacheEndpoint
    extends AbstractIgniteEndpoint
    Perform cache operations on an Ignite cache or consume changes from a continuous query.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)  
      org.apache.camel.Producer createProducer()  
      String getCacheName()
      Gets the cache name.
      org.apache.ignite.cache.CachePeekMode getCachePeekMode()
      Gets the CachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).
      IgniteCacheOperation getOperation()
      Gets the cache operation to invoke.
      int getPageSize()
      Gets the page size.
      org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<Object,​Object>> getQuery()
      Gets the query to execute, only needed for operations that require it, and for the Continuous Query Consumer.
      org.apache.ignite.cache.CacheEntryEventSerializableFilter<Object,​Object> getRemoteFilter()
      Gets the remote filter, only used by the Continuous Query Consumer.
      long getTimeInterval()
      Gets the time interval for the Continuous Query Consumer.
      boolean isAutoUnsubscribe()
      Gets whether auto unsubscribe is enabled in the Continuous Query Consumer.
      boolean isFailIfInexistentCache()
      Whether to fail the initialization if the cache doesn't exist.
      boolean isFireExistingQueryResults()
      Gets whether to process existing results that match the query.
      boolean isOneExchangePerUpdate()
      Gets whether to pack each update in an individual Exchange, even if multiple updates are received in one batch.
      protected org.apache.ignite.IgniteCache<Object,​Object> obtainCache()  
      void setAutoUnsubscribe​(boolean autoUnsubscribe)
      Whether auto unsubscribe is enabled in the Continuous Query Consumer.
      void setCacheName​(String cacheName)
      The cache name.
      void setCachePeekMode​(org.apache.ignite.cache.CachePeekMode cachePeekMode)
      The CachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).
      void setFailIfInexistentCache​(boolean failIfInexistentCache)
      Whether to fail the initialization if the cache doesn't exist.
      void setFireExistingQueryResults​(boolean fireExistingQueryResults)
      Whether to process existing results that match the query.
      void setOneExchangePerUpdate​(boolean oneExchangePerUpdate)
      Whether to pack each update in an individual Exchange, even if multiple updates are received in one batch.
      void setOperation​(IgniteCacheOperation operation)
      The cache operation to invoke.
      void setPageSize​(int pageSize)
      The page size.
      void setQuery​(org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<Object,​Object>> query)
      The Query to execute, only needed for operations that require it, and for the Continuous Query Consumer.
      void setRemoteFilter​(org.apache.ignite.cache.CacheEntryEventSerializableFilter<Object,​Object> remoteFilter)
      The remote filter, only used by the Continuous Query Consumer.
      void setTimeInterval​(long timeInterval)
      The time interval for the Continuous Query Consumer.
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Endpoint

        getEndpointBaseUri, isSingletonProducer
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Method Detail

      • createProducer

        public org.apache.camel.Producer createProducer()
                                                 throws Exception
        Throws:
        Exception
      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
                                                 throws Exception
        Throws:
        Exception
      • obtainCache

        protected org.apache.ignite.IgniteCache<Object,​Object> obtainCache()
                                                                          throws org.apache.camel.CamelException
        Throws:
        org.apache.camel.CamelException
      • getCacheName

        public String getCacheName()
        Gets the cache name.
        Returns:
      • setCacheName

        public void setCacheName​(String cacheName)
        The cache name.
        Parameters:
        cacheName - cache name
      • getOperation

        public IgniteCacheOperation getOperation()
        Gets the cache operation to invoke.
        Returns:
        cache name
      • setOperation

        public void setOperation​(IgniteCacheOperation operation)
        The cache operation to invoke.

        Possible values: GET, PUT, REMOVE, SIZE, REBALANCE, QUERY, CLEAR.

        Parameters:
        operation -
      • isFailIfInexistentCache

        public boolean isFailIfInexistentCache()
        Whether to fail the initialization if the cache doesn't exist.
        Returns:
      • setFailIfInexistentCache

        public void setFailIfInexistentCache​(boolean failIfInexistentCache)
        Whether to fail the initialization if the cache doesn't exist.
        Parameters:
        failIfInexistentCache -
      • getCachePeekMode

        public org.apache.ignite.cache.CachePeekMode getCachePeekMode()
        Gets the CachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).
        Returns:
      • setCachePeekMode

        public void setCachePeekMode​(org.apache.ignite.cache.CachePeekMode cachePeekMode)
        The CachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).
        Parameters:
        cachePeekMode -
      • getQuery

        public org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<Object,​Object>> getQuery()
        Gets the query to execute, only needed for operations that require it, and for the Continuous Query Consumer.
        Returns:
      • setQuery

        public void setQuery​(org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<Object,​Object>> query)
        The Query to execute, only needed for operations that require it, and for the Continuous Query Consumer.
        Parameters:
        query -
      • getRemoteFilter

        public org.apache.ignite.cache.CacheEntryEventSerializableFilter<Object,​Object> getRemoteFilter()
        Gets the remote filter, only used by the Continuous Query Consumer.
        Returns:
      • setRemoteFilter

        public void setRemoteFilter​(org.apache.ignite.cache.CacheEntryEventSerializableFilter<Object,​Object> remoteFilter)
        The remote filter, only used by the Continuous Query Consumer.
        Parameters:
        remoteFilter -
      • isOneExchangePerUpdate

        public boolean isOneExchangePerUpdate()
        Gets whether to pack each update in an individual Exchange, even if multiple updates are received in one batch. Only used by the Continuous Query Consumer.
        Returns:
      • setOneExchangePerUpdate

        public void setOneExchangePerUpdate​(boolean oneExchangePerUpdate)
        Whether to pack each update in an individual Exchange, even if multiple updates are received in one batch. Only used by the Continuous Query Consumer.
        Parameters:
        oneExchangePerUpdate -
      • isAutoUnsubscribe

        public boolean isAutoUnsubscribe()
        Gets whether auto unsubscribe is enabled in the Continuous Query Consumer.
        Returns:
      • setAutoUnsubscribe

        public void setAutoUnsubscribe​(boolean autoUnsubscribe)
        Whether auto unsubscribe is enabled in the Continuous Query Consumer.
        Parameters:
        autoUnsubscribe -
      • getPageSize

        public int getPageSize()
        Gets the page size. Only used by the Continuous Query Consumer.
        Returns:
      • setPageSize

        public void setPageSize​(int pageSize)
        The page size. Only used by the Continuous Query Consumer.
        Parameters:
        pageSize -
      • isFireExistingQueryResults

        public boolean isFireExistingQueryResults()
        Gets whether to process existing results that match the query. Used on initialization of the Continuous Query Consumer.
        Returns:
      • setFireExistingQueryResults

        public void setFireExistingQueryResults​(boolean fireExistingQueryResults)
        Whether to process existing results that match the query. Used on initialization of the Continuous Query Consumer.
        Parameters:
        fireExistingQueryResults -
      • getTimeInterval

        public long getTimeInterval()
        Gets the time interval for the Continuous Query Consumer.
        Returns:
      • setTimeInterval

        public void setTimeInterval​(long timeInterval)
        The time interval for the Continuous Query Consumer.
        Parameters:
        timeInterval -