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}) public class IgniteCacheEndpoint extends AbstractIgniteEndpointPerform cache operations on an Ignite cache or consume changes from a continuous query.
-
-
Field Summary
-
Fields inherited from class org.apache.camel.component.ignite.AbstractIgniteEndpoint
component
-
-
Constructor Summary
Constructors Constructor Description IgniteCacheEndpoint(String endpointUri, String remaining, Map<String,Object> parameters, IgniteCacheComponent igniteComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)org.apache.camel.ProducercreateProducer()StringgetCacheName()Gets the cache name.org.apache.ignite.cache.CachePeekModegetCachePeekMode()Gets theCachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).IgniteCacheOperationgetOperation()Gets the cache operation to invoke.intgetPageSize()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.longgetTimeInterval()Gets the time interval for the Continuous Query Consumer.booleanisAutoUnsubscribe()Gets whether auto unsubscribe is enabled in the Continuous Query Consumer.booleanisFailIfInexistentCache()Whether to fail the initialization if the cache doesn't exist.booleanisFireExistingQueryResults()Gets whether to process existing results that match the query.booleanisOneExchangePerUpdate()Gets whether to pack each update in an individual Exchange, even if multiple updates are received in one batch.voidsetAutoUnsubscribe(boolean autoUnsubscribe)Whether auto unsubscribe is enabled in the Continuous Query Consumer.voidsetCacheName(String cacheName)The cache name.voidsetCachePeekMode(org.apache.ignite.cache.CachePeekMode cachePeekMode)TheCachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).voidsetFailIfInexistentCache(boolean failIfInexistentCache)Whether to fail the initialization if the cache doesn't exist.voidsetFireExistingQueryResults(boolean fireExistingQueryResults)Whether to process existing results that match the query.voidsetOneExchangePerUpdate(boolean oneExchangePerUpdate)Whether to pack each update in an individual Exchange, even if multiple updates are received in one batch.voidsetOperation(IgniteCacheOperation operation)The cache operation to invoke.voidsetPageSize(int pageSize)The page size.voidsetQuery(org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<Object,Object>> query)TheQueryto execute, only needed for operations that require it, and for the Continuous Query Consumer.voidsetRemoteFilter(org.apache.ignite.cache.CacheEntryEventSerializableFilter<Object,Object> remoteFilter)The remote filter, only used by the Continuous Query Consumer.voidsetTimeInterval(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, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, 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
-
-
-
-
Method Detail
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception- Throws:
Exception
-
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 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
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)
TheQueryto 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-
-
-