@UriEndpoint(firstVersion="2.9.0", scheme="krati", title="Krati", syntax="krati:path", consumerClass=KratiConsumer.class, label="database,nosql") public class KratiEndpoint extends org.apache.camel.impl.ScheduledPollEndpoint
Modifier and Type | Field and Description |
---|---|
protected static Map<String,KratiDataStoreRegistration> |
dataStoreRegistry |
protected krati.util.HashFunction<byte[]> |
hashFunction |
protected int |
initialCapacity |
protected String |
key |
protected krati.io.Serializer<Object> |
keySerializer |
protected int |
maxMessagesPerPoll |
protected String |
operation |
protected String |
path |
protected krati.core.segment.SegmentFactory |
segmentFactory |
protected int |
segmentFileSize |
protected String |
value |
protected krati.io.Serializer<Object> |
valueSerializer |
Constructor and Description |
---|
KratiEndpoint(String uri,
KratiComponent component) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
krati.util.HashFunction<byte[]> |
getHashFunction() |
int |
getInitialCapacity() |
String |
getKey() |
krati.io.Serializer<Object> |
getKeySerializer() |
int |
getMaxMessagesPerPoll() |
String |
getOperation() |
String |
getPath()
Path of the datastore is the relative path of the folder that krati will use for its datastore.
|
protected String |
getPath(String uri)
Returns the path from the URI.
|
krati.core.segment.SegmentFactory |
getSegmentFactory() |
int |
getSegmentFileSize() |
String |
getValue() |
krati.io.Serializer<Object> |
getValueSerializer() |
boolean |
isSingleton() |
void |
setHashFunction(krati.util.HashFunction<byte[]> hashFunction)
The hash function to use.
|
void |
setInitialCapacity(int initialCapacity)
The inital capcity of the store.
|
void |
setKey(String key)
The key.
|
void |
setKeySerializer(krati.io.Serializer<Object> keySerializer)
The serializer that will be used to serialize the key.
|
void |
setMaxMessagesPerPoll(int maxMessagesPerPoll)
The maximum number of messages which can be received in one poll.
|
void |
setOperation(String operation)
Specifies the type of operation that will be performed to the datastore.
|
void |
setSegmentFactory(krati.core.segment.SegmentFactory segmentFactory)
Sets the segment factory of the target store.
|
void |
setSegmentFileSize(int segmentFileSize)
Data store segments size in MB.
|
void |
setValue(String value)
The Value.
|
void |
setValueSerializer(krati.io.Serializer<Object> valueSerializer)
The serializer that will be used to serialize the value.
|
void |
stop() |
configurePollingConsumer, configureProperties, configureScheduledPollConsumerProperties, doStart, doStop, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, initConsumerProperties, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configureConsumer, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, suspend
protected static Map<String,KratiDataStoreRegistration> dataStoreRegistry
@UriPath @Metadata(required="true") protected String path
@UriParam(label="producer", enums="CamelKratiPut,CamelKratiGet,CamelKratiDelete,CamelKratiDeleteAll") protected String operation
@UriParam(label="producer") protected String key
@UriParam(label="producer") protected String value
@UriParam(defaultValue="100") protected int initialCapacity
@UriParam(defaultValue="64") protected int segmentFileSize
@UriParam protected krati.io.Serializer<Object> keySerializer
@UriParam protected krati.io.Serializer<Object> valueSerializer
@UriParam protected krati.core.segment.SegmentFactory segmentFactory
@UriParam protected krati.util.HashFunction<byte[]> hashFunction
@UriParam(label="consumer") protected int maxMessagesPerPoll
public KratiEndpoint(String uri, KratiComponent component) throws URISyntaxException
URISyntaxException
public void stop() throws Exception
stop
in interface org.apache.camel.Service
stop
in class org.apache.camel.support.ServiceSupport
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
Exception
public boolean isSingleton()
protected String getPath(String uri) throws URISyntaxException
URISyntaxException
public String getKey()
public void setKey(String key)
public String getValue()
public void setValue(String value)
public String getOperation()
public void setOperation(String operation)
public int getInitialCapacity()
public void setInitialCapacity(int initialCapacity)
public int getSegmentFileSize()
public void setSegmentFileSize(int segmentFileSize)
public krati.core.segment.SegmentFactory getSegmentFactory()
public void setSegmentFactory(krati.core.segment.SegmentFactory segmentFactory)
public krati.util.HashFunction<byte[]> getHashFunction()
public void setHashFunction(krati.util.HashFunction<byte[]> hashFunction)
public String getPath()
public int getMaxMessagesPerPoll()
public void setMaxMessagesPerPoll(int maxMessagesPerPoll)
public krati.io.Serializer<Object> getKeySerializer()
public void setKeySerializer(krati.io.Serializer<Object> keySerializer)
public krati.io.Serializer<Object> getValueSerializer()
public void setValueSerializer(krati.io.Serializer<Object> valueSerializer)
Apache Camel