001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.camel.component.hazelcast;
018
019 public final class HazelcastConstants {
020
021 /*
022 * uri prefixes
023 */
024 public static final String MAP_PREFIX = "map:";
025 public static final String MULTIMAP_PREFIX = "multimap:";
026 public static final String ATOMICNUMBER_PREFIX = "atomicvalue:";
027 public static final String INSTANCE_PREFIX = "instance:";
028 public static final String QUEUE_PREFIX = "queue:";
029 public static final String SEDA_PREFIX = "seda:";
030 public static final String LIST_PREFIX = "list:";
031
032 /*
033 * incoming header properties
034 */
035 public static final String OBJECT_ID = "CamelHazelcastObjectId";
036 public static final String OBJECT_POS = "CamelHazelcastObjectIndex";
037 public static final String QUERY = "CamelHazelcastQuery";
038
039 /*
040 * outgoing header properties
041 */
042 public static final String LISTENER_ACTION = "CamelHazelcastListenerAction";
043 public static final String LISTENER_TYPE = "CamelHazelcastListenerType";
044 public static final String LISTENER_TIME = "CamelHazelcastListenerTime";
045 public static final String INSTANCE_HOST = "CamelHazelcastInstanceHost";
046 public static final String INSTANCE_PORT = "CamelHazelcastInstancePort";
047 public static final String CACHE_NAME = "CamelHazelcastCacheName";
048 public static final String CACHE_TYPE = "CamelHazelcastCacheType";
049
050 // actions (put, delete, get, update)
051 public static final String OPERATION = "CamelHazelcastOperationType";
052 public static final int PUT_OPERATION = 1;
053 public static final int DELETE_OPERATION = 2;
054 public static final int GET_OPERATION = 3;
055 public static final int UPDATE_OPERATION = 4;
056 public static final int QUERY_OPERATION = 5;
057
058 // multimap
059 public static final int REMOVEVALUE_OPERATION = 10;
060
061 // atomic numbers
062 public static final int INCREMENT_OPERATION = 20;
063 public static final int DECREMENT_OPERATION = 21;
064 public static final int SETVALUE_OPERATION = 22;
065 public static final int DESTROY_OPERATION = 23;
066
067 // queue
068 public static final int ADD_OPERATION = 31;
069 public static final int OFFER_OPERATION = 32;
070 public static final int PEEK_OPERATION = 33;
071 public static final int POLL_OPERATION = 34;
072
073 /*
074 * header values
075 */
076
077 // listener actions
078 public static final String REMOVED = "removed";
079 public static final String ENVICTED = "envicted";
080 public static final String UPDATED = "updated";
081 public static final String ADDED = "added";
082
083 // storage types (map, queue, topic, multimap)
084 public static final String MAP = "map";
085 public static final String MULTIMAP = "multimap";
086 public static final String ATOMICNUMBER = "atomicnumber";
087 public static final String QUEUE = "queue";
088
089 // listener types
090 public static final String CACHE_LISTENER = "cachelistener";
091 public static final String INSTANCE_LISTENER = "instancelistener";
092 public static final String ITEM_LISTENER = "itemlistener";
093
094 private HazelcastConstants() {
095 }
096
097 }