Class IgniteCacheEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.ignite.AbstractIgniteEndpoint
org.apache.camel.component.ignite.cache.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},
headersClass=IgniteConstants.class)
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
-
Constructor Summary
ConstructorDescriptionIgniteCacheEndpoint
(String endpointUri, String remaining, Map<String, Object> parameters, IgniteCacheComponent igniteComponent) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
Gets the cache name.org.apache.ignite.cache.CachePeekMode
Gets theCachePeekMode
, only needed for operations that require it (IgniteCacheOperation.SIZE
).Gets the cache operation to invoke.int
Gets the page size.getQuery()
Gets the query to execute, only needed for operations that require it, and for the Continuous Query Consumer.Gets the remote filter, only used by the Continuous Query Consumer.long
Gets the time interval for the Continuous Query Consumer.boolean
Gets whether auto unsubscribe is enabled in the Continuous Query Consumer.boolean
Whether to fail the initialization if the cache doesn't exist.boolean
Gets whether to process existing results that match the query.boolean
Gets whether to pack each update in an individual Exchange, even if multiple updates are received in one batch.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) TheCachePeekMode
, 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
TheQuery
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.component.ignite.AbstractIgniteEndpoint
ignite, igniteComponent, isPropagateIncomingBodyIfNoReturnValue, isTreatCollectionsAsCacheObjects, setPropagateIncomingBodyIfNoReturnValue, setTreatCollectionsAsCacheObjects
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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
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
-
Constructor Details
-
IgniteCacheEndpoint
-
-
Method Details
-
createProducer
- 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
Gets the cache name.- Returns:
-
setCacheName
The cache name.- Parameters:
cacheName
- cache name
-
getOperation
Gets the cache operation to invoke.- Returns:
- cache name
-
setOperation
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 theCachePeekMode
, only needed for operations that require it (IgniteCacheOperation.SIZE
).- Returns:
-
setCachePeekMode
public void setCachePeekMode(org.apache.ignite.cache.CachePeekMode cachePeekMode) TheCachePeekMode
, only needed for operations that require it (IgniteCacheOperation.SIZE
).- Parameters:
cachePeekMode
-
-
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) TheQuery
to execute, only needed for operations that require it, and for the Continuous Query Consumer.- Parameters:
query
-
-
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
-
-