当前位置: 首页>>代码示例>>Java>>正文


Java HazelcastConstants.CLEAR_OPERATION属性代码示例

本文整理汇总了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);
    }
 
开发者ID:HydAu,项目名称:Camel,代码行数:37,代码来源:HazelcastSetProducer.java

示例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);
    }
 
开发者ID:HydAu,项目名称:Camel,代码行数:57,代码来源:HazelcastListProducer.java

示例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);
    }
 
开发者ID:HydAu,项目名称:Camel,代码行数:45,代码来源:HazelcastReplicatedmapProducer.java

示例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);
    }
 
开发者ID:HydAu,项目名称:Camel,代码行数:53,代码来源:HazelcastMultimapProducer.java


注:本文中的org.apache.camel.component.hazelcast.HazelcastConstants.CLEAR_OPERATION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。