本文整理汇总了Java中org.apache.camel.component.hazelcast.HazelcastConstants.CLEAR_OPERATION属性的典型用法代码示例。如果您正苦于以下问题:Java HazelcastConstants.CLEAR_OPERATION属性的具体用法?Java HazelcastConstants.CLEAR_OPERATION怎么用?Java HazelcastConstants.CLEAR_OPERATION使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.camel.component.hazelcast.HazelcastConstants
的用法示例。
在下文中一共展示了HazelcastConstants.CLEAR_OPERATION属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
public void process(Exchange exchange) throws Exception {
final int operation = lookupOperationNumber(exchange);
switch (operation) {
case HazelcastConstants.ADD_OPERATION:
this.add(exchange);
break;
case HazelcastConstants.REMOVEVALUE_OPERATION:
this.remove(exchange);
break;
case HazelcastConstants.CLEAR_OPERATION:
this.clear();
break;
case HazelcastConstants.ADD_ALL_OPERATION:
this.addAll(exchange);
break;
case HazelcastConstants.REMOVE_ALL_OPERATION:
this.removeAll(exchange);
break;
case HazelcastConstants.RETAIN_ALL_OPERATION:
this.retainAll(exchange);
break;
default:
throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the LIST cache.", operation, HazelcastConstants.OPERATION));
}
// finally copy headers
HazelcastComponentHelper.copyHeaders(exchange);
}
示例2: process
public void process(Exchange exchange) throws Exception {
Map<String, Object> headers = exchange.getIn().getHeaders();
// get header parameters
Integer pos = null;
if (headers.containsKey(HazelcastConstants.OBJECT_POS)) {
if (!(headers.get(HazelcastConstants.OBJECT_POS) instanceof Integer)) {
throw new IllegalArgumentException("OBJECT_POS Should be of type Integer");
}
pos = (Integer) headers.get(HazelcastConstants.OBJECT_POS);
}
final int operation = lookupOperationNumber(exchange);
switch (operation) {
case HazelcastConstants.ADD_OPERATION:
this.add(pos, exchange);
break;
case HazelcastConstants.GET_OPERATION:
this.get(pos, exchange);
break;
case HazelcastConstants.SETVALUE_OPERATION:
this.set(pos, exchange);
break;
case HazelcastConstants.REMOVEVALUE_OPERATION:
this.remove(pos, exchange);
break;
case HazelcastConstants.CLEAR_OPERATION:
this.clear();
break;
case HazelcastConstants.ADD_ALL_OPERATION:
this.addAll(pos, exchange);
break;
case HazelcastConstants.REMOVE_ALL_OPERATION:
this.removeAll(exchange);
break;
case HazelcastConstants.RETAIN_ALL_OPERATION:
this.retainAll(exchange);
break;
default:
throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the LIST cache.", operation, HazelcastConstants.OPERATION));
}
// finally copy headers
HazelcastComponentHelper.copyHeaders(exchange);
}
示例3: process
public void process(Exchange exchange) throws Exception {
Map<String, Object> headers = exchange.getIn().getHeaders();
// get header parameters
Object oid = null;
if (headers.containsKey(HazelcastConstants.OBJECT_ID)) {
oid = headers.get(HazelcastConstants.OBJECT_ID);
}
final int operation = lookupOperationNumber(exchange);
switch (operation) {
case HazelcastConstants.PUT_OPERATION:
this.put(oid, exchange);
break;
case HazelcastConstants.GET_OPERATION:
this.get(oid, exchange);
break;
case HazelcastConstants.DELETE_OPERATION:
this.delete(oid);
break;
case HazelcastConstants.CLEAR_OPERATION:
this.clear(exchange);
break;
case HazelcastConstants.CONTAINS_KEY_OPERATION:
this.containsKey(oid, exchange);
break;
case HazelcastConstants.CONTAINS_VALUE_OPERATION:
this.containsValue(exchange);
break;
default:
throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the MULTIMAP cache.", operation, HazelcastConstants.OPERATION));
}
// finally copy headers
HazelcastComponentHelper.copyHeaders(exchange);
}
示例4: process
public void process(Exchange exchange) throws Exception {
Map<String, Object> headers = exchange.getIn().getHeaders();
// get header parameters
Object oid = null;
if (headers.containsKey(HazelcastConstants.OBJECT_ID)) {
oid = headers.get(HazelcastConstants.OBJECT_ID);
}
final int operation = lookupOperationNumber(exchange);
switch (operation) {
case HazelcastConstants.PUT_OPERATION:
this.put(oid, exchange);
break;
case HazelcastConstants.GET_OPERATION:
this.get(oid, exchange);
break;
case HazelcastConstants.DELETE_OPERATION:
this.delete(oid);
break;
case HazelcastConstants.REMOVEVALUE_OPERATION:
this.removevalue(oid, exchange);
break;
case HazelcastConstants.CONTAINS_KEY_OPERATION:
this.containsKey(oid, exchange);
break;
case HazelcastConstants.CONTAINS_VALUE_OPERATION:
this.containsValue(exchange);
break;
case HazelcastConstants.CLEAR_OPERATION:
this.clear(exchange);
break;
case HazelcastConstants.VALUE_COUNT_OPERATION:
this.valuecount(oid, exchange);
break;
default:
throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the MULTIMAP cache.", operation, HazelcastConstants.OPERATION));
}
// finally copy headers
HazelcastComponentHelper.copyHeaders(exchange);
}