/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. package com.google.ie.common.cache;
  16. /**
  17. * Contains constants used by {@link CacheHelper} class
  18. *
  19. * @author Sachneet
  20. *
  21. */
  22. public interface CacheConstants {
  23. /* Name spaces for entities */
  24. String IDEA_NAMESPACE = "idea";
  25. String PROJECT_NAMESPACE = "project";
  26. String TAG_NAMESPACE = "tag";
  27. String CATEGORY_NAMESPACE = "category";
  28. String IDEA_SHARD_NAMESPACE = "idea_shard";
  29. String UNDERSCORE = "_";
  30. String RECENT_IDEAS = "recentIdeas";
  31. String POPULAR_IDEAS = "popularIdeas";
  32. String RECENTLY_PICKED_IDEAS = "recentlyPickedIdeas";
  33. String RECENTLY_PICKED = "recently_picked";
  34. /* Keys used to put list of specific entities */
  35. String CATEGORIES = "categories";
  36. String TAG_CLOUD = "tagCloud";
  37. /* Message for IllegalArgumentException */
  38. String NAMESPACE_OR_KEY_IS_NULL = "The namespace or the key is null !";
  39. /* Popular ideas expiry time for cache.Currently 120 seconds */
  40. int POPULAR_IDEAS_EXPIRATION_DELAY = 120;
  41. /* Recent ideas expiry time for cache.Currently 120 seconds */
  42. int RECENT_IDEAS_EXPIRATION_DELAY = 120;
  43. /*
  44. * Recently picked ideas expiry time for cache.Currently 120 seconds
  45. */
  46. int RECENTLY_PICKED_IDEAS_EXPIRATION_DELAY = 120;
  47. /*
  48. * Expiration time for the categories data in cache.Currently 86400 seconds
  49. * (one day)
  50. */
  51. int CATEGORIES_EXPIRATION_DELAY = 86400;
  52. /* Expiration time for the tag cloud data in cache.Currently 120 seconds */
  53. int TAG_CLOUD_DATA_EXPIRATION_DELAY = 120;
  54. }