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.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,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,CLUSTERING},
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
ConstructorsConstructorDescriptionIgniteCacheEndpoint(String endpointUri, String remaining, Map<String, Object> parameters, IgniteCacheComponent igniteComponent) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.ProducerGets the cache name.org.apache.ignite.cache.CachePeekModeGets theCachePeekMode, only needed for operations that require it (IgniteCacheOperation.SIZE).Gets the cache operation to invoke.intGets 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.longGets the time interval for the Continuous Query Consumer.booleanGets whether auto unsubscribe is enabled in the Continuous Query Consumer.booleanWhether to fail the initialization if the cache doesn't exist.booleanGets whether to process existing results that match the query.booleanGets 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.voidTheQueryto 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, setTreatCollectionsAsCacheObjectsMethods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, 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, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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) TheQueryto 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-
-