Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ hazelcast-instance
hazelcast-list
hazelcast-map
hazelcast-multimap
hazelcast-pncounter
hazelcast-queue
hazelcast-replicatedmap
hazelcast-ringbuffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "hazelcast-atomicvalue",
"title": "Hazelcast Atomic Number",
"description": "Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number).",
"deprecated": false,
"deprecated": true,
"firstVersion": "2.7.0",
"label": "cache,clustering",
"javaType": "org.apache.camel.component.hazelcast.atomicnumber.HazelcastAtomicnumberComponent",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"component": {
"kind": "component",
"name": "hazelcast-pncounter",
"title": "Hazelcast PN Counter",
"description": "Increment, decrement, get, etc. operations on a Hazelcast PN Counter (CRDT counter).",
"deprecated": false,
"firstVersion": "4.19.0",
"label": "cache,clustering",
"javaType": "org.apache.camel.component.hazelcast.pncounter.HazelcastPNCounterComponent",
"supportLevel": "Preview",
"groupId": "org.apache.camel",
"artifactId": "camel-hazelcast",
"version": "4.19.0-SNAPSHOT",
"scheme": "hazelcast-pncounter",
"extendsScheme": "",
"syntax": "hazelcast-pncounter:cacheName",
"async": false,
"api": false,
"consumerOnly": false,
"producerOnly": true,
"lenientProperties": false,
"browsable": false,
"remote": true
},
"componentProperties": {
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
"autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." },
"hazelcastInstance": { "index": 2, "kind": "property", "displayName": "Hazelcast Instance", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast instance." },
"hazelcastMode": { "index": 3, "kind": "property", "displayName": "Hazelcast Mode", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "node", "description": "The hazelcast mode reference which kind of instance should be used. If you don't specify the mode, then the node mode will be the default." }
},
"properties": {
"cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" },
"defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "destroy", "compareAndSet", "getAndAdd", "add", "offer", "peek", "poll", "remainingCapacity", "drainTo", "removeIf", "take", "publish", "readOnceHead", "readOnceTail", "capacity" ], "deprecated": false, "autowired": false, "secret": false, "description": "To specify a default operation to use, if no operation header has been provided." },
"hazelcastConfigUri": { "index": 2, "kind": "parameter", "displayName": "Hazelcast Config Uri", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "supportFileReference": true, "description": "Hazelcast configuration file." },
"hazelcastInstance": { "index": 3, "kind": "parameter", "displayName": "Hazelcast Instance", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint." },
"hazelcastInstanceName": { "index": 4, "kind": "parameter", "displayName": "Hazelcast Instance Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast instance." },
"lazyStartProducer": { "index": 5, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.hazelcast.pncounter;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
* Generated by camel build tools - do NOT edit this file!
*/
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class HazelcastPNCounterComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
HazelcastPNCounterComponent target = (HazelcastPNCounterComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "autowiredenabled":
case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
case "hazelcastinstance":
case "hazelcastInstance": target.setHazelcastInstance(property(camelContext, com.hazelcast.core.HazelcastInstance.class, value)); return true;
case "hazelcastmode":
case "hazelcastMode": target.setHazelcastMode(property(camelContext, java.lang.String.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}

@Override
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "autowiredenabled":
case "autowiredEnabled": return boolean.class;
case "hazelcastinstance":
case "hazelcastInstance": return com.hazelcast.core.HazelcastInstance.class;
case "hazelcastmode":
case "hazelcastMode": return java.lang.String.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
default: return null;
}
}

@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
HazelcastPNCounterComponent target = (HazelcastPNCounterComponent) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "autowiredenabled":
case "autowiredEnabled": return target.isAutowiredEnabled();
case "hazelcastinstance":
case "hazelcastInstance": return target.getHazelcastInstance();
case "hazelcastmode":
case "hazelcastMode": return target.getHazelcastMode();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
default: return null;
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.hazelcast.pncounter;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
* Generated by camel build tools - do NOT edit this file!
*/
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class HazelcastPNCounterEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
HazelcastPNCounterEndpoint target = (HazelcastPNCounterEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "defaultoperation":
case "defaultOperation": target.setDefaultOperation(property(camelContext, org.apache.camel.component.hazelcast.HazelcastOperation.class, value)); return true;
case "hazelcastconfiguri":
case "hazelcastConfigUri": target.setHazelcastConfigUri(property(camelContext, java.lang.String.class, value)); return true;
case "hazelcastinstance":
case "hazelcastInstance": target.setHazelcastInstance(property(camelContext, com.hazelcast.core.HazelcastInstance.class, value)); return true;
case "hazelcastinstancename":
case "hazelcastInstanceName": target.setHazelcastInstanceName(property(camelContext, java.lang.String.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}

@Override
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "defaultoperation":
case "defaultOperation": return org.apache.camel.component.hazelcast.HazelcastOperation.class;
case "hazelcastconfiguri":
case "hazelcastConfigUri": return java.lang.String.class;
case "hazelcastinstance":
case "hazelcastInstance": return com.hazelcast.core.HazelcastInstance.class;
case "hazelcastinstancename":
case "hazelcastInstanceName": return java.lang.String.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
default: return null;
}
}

@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
HazelcastPNCounterEndpoint target = (HazelcastPNCounterEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "defaultoperation":
case "defaultOperation": return target.getDefaultOperation();
case "hazelcastconfiguri":
case "hazelcastConfigUri": return target.getHazelcastConfigUri();
case "hazelcastinstance":
case "hazelcastInstance": return target.getHazelcastInstance();
case "hazelcastinstancename":
case "hazelcastInstanceName": return target.getHazelcastInstanceName();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
default: return null;
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.hazelcast.pncounter;

import javax.annotation.processing.Generated;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.camel.spi.EndpointUriFactory;

/**
* Generated by camel build tools - do NOT edit this file!
*/
@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
public class HazelcastPNCounterEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {

private static final String BASE = ":cacheName";

private static final Set<String> PROPERTY_NAMES;
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Map<String, String> MULTI_VALUE_PREFIXES;
static {
Set<String> props = new HashSet<>(6);
props.add("cacheName");
props.add("defaultOperation");
props.add("hazelcastConfigUri");
props.add("hazelcastInstance");
props.add("hazelcastInstanceName");
props.add("lazyStartProducer");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
SECRET_PROPERTY_NAMES = Collections.emptySet();
MULTI_VALUE_PREFIXES = Collections.emptyMap();
}

@Override
public boolean isEnabled(String scheme) {
return "hazelcast-pncounter".equals(scheme);
}

@Override
public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
String syntax = scheme + BASE;
String uri = syntax;

Map<String, Object> copy = new HashMap<>(properties);

uri = buildPathParameter(syntax, uri, "cacheName", null, true, copy);
uri = buildQueryParameters(uri, copy, encode);
return uri;
}

@Override
public Set<String> propertyNames() {
return PROPERTY_NAMES;
}

@Override
public Set<String> secretPropertyNames() {
return SECRET_PROPERTY_NAMES;
}

@Override
public Map<String, String> multiValuePrefixes() {
return MULTI_VALUE_PREFIXES;
}

@Override
public boolean isLenientProperties() {
return false;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "hazelcast-atomicvalue",
"title": "Hazelcast Atomic Number",
"description": "Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number).",
"deprecated": false,
"deprecated": true,
"firstVersion": "2.7.0",
"label": "cache,clustering",
"javaType": "org.apache.camel.component.hazelcast.atomicnumber.HazelcastAtomicnumberComponent",
Expand Down
Loading
Loading