PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/src/main/java/com/google/ie/common/cache/CacheConstants.java

http://thoughtsite.googlecode.com/
Java | 59 lines | 21 code | 5 blank | 33 comment | 0 complexity | dac5e0515e98e4eac18aba585a99f95e MD5 | raw file
 1/* Copyright 2010 Google Inc.
 2 * 
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 * 
 7 *      http://www.apache.org/licenses/LICENSE-2.0
 8 * 
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS.
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License
14 */
15
16package com.google.ie.common.cache;
17
18/**
19 * Contains constants used by {@link CacheHelper} class
20 * 
21 * @author Sachneet
22 * 
23 */
24public interface CacheConstants {
25    /* Name spaces for entities */
26    String IDEA_NAMESPACE = "idea";
27    String PROJECT_NAMESPACE = "project";
28    String TAG_NAMESPACE = "tag";
29    String CATEGORY_NAMESPACE = "category";
30    String IDEA_SHARD_NAMESPACE = "idea_shard";
31    String UNDERSCORE = "_";
32    String RECENT_IDEAS = "recentIdeas";
33    String POPULAR_IDEAS = "popularIdeas";
34    String RECENTLY_PICKED_IDEAS = "recentlyPickedIdeas";
35    String RECENTLY_PICKED = "recently_picked";
36
37    /* Keys used to put list of specific entities */
38    String CATEGORIES = "categories";
39    String TAG_CLOUD = "tagCloud";
40    /* Message for IllegalArgumentException */
41    String NAMESPACE_OR_KEY_IS_NULL = "The namespace or the key is null !";
42    /* Popular ideas expiry time for cache.Currently 120 seconds */
43    int POPULAR_IDEAS_EXPIRATION_DELAY = 120;
44    /* Recent ideas expiry time for cache.Currently 120 seconds */
45    int RECENT_IDEAS_EXPIRATION_DELAY = 120;
46    /*
47     * Recently picked ideas expiry time for cache.Currently 120 seconds
48     */
49    int RECENTLY_PICKED_IDEAS_EXPIRATION_DELAY = 120;
50    /*
51     * Expiration time for the categories data in cache.Currently 86400 seconds
52     * (one day)
53     */
54    int CATEGORIES_EXPIRATION_DELAY = 86400;
55    /* Expiration time for the tag cloud data in cache.Currently 120 seconds */
56    int TAG_CLOUD_DATA_EXPIRATION_DELAY = 120;
57
58}
59