VMware GemFire Native Client Cache Reference  9.0.6
ExpirationAction.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_EXPIRATIONACTION_H__
2 #define __GEMFIRE_EXPIRATIONACTION_H__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 
11 #include "gfcpp_globals.hpp"
12 
17 namespace gemfire {
25  //public static methods
26  public:
27  // types of action
28 
29  typedef enum {
31  INVALIDATE = 0,
34 
39 
41  INVALID_ACTION } Action;
42 
46  static Action fromName(const char* name) ;
47 
52  inline static bool isInvalidate(const Action type)
53  {
54  return (type==INVALIDATE);
55  }
56 
61  inline static bool isLocalInvalidate(const Action type)
62  {
63  return (type==LOCAL_INVALIDATE);
64  }
65 
69  inline static bool isDestroy(const Action type)
70  {
71  return (type==DESTROY);
72  }
73 
77  inline static bool isLocalDestroy(const Action type)
78  {
79  return (type==LOCAL_DESTROY);
80  }
81 
85  inline static bool isLocal(const Action type)
86  {
87  return (type == LOCAL_INVALIDATE) || (type==LOCAL_DESTROY);
88  }
89 
93  inline static bool isDistributed(const Action type)
94  {
95  return (type == INVALIDATE) || (type==DESTROY);
96  }
97 
99  static const char* fromOrdinal(const int ordinal) ;
100 
101  private:
103  ~ExpirationAction();
104  static char* names[] ;
105 };
106 }; //namespace gemfire
107 #endif //ifndef __GEMFIRE_EXPIRATIONACTION_H__
static bool isInvalidate(const Action type)
Returns whether this is the action for distributed invalidate.
Definition: ExpirationAction.hpp:52
Action
Definition: ExpirationAction.hpp:29
static bool isLocal(const Action type)
Returns whether this action is local.
Definition: ExpirationAction.hpp:85
When expired, invalidated locally only.
Definition: ExpirationAction.hpp:33
static bool isLocalDestroy(const Action type)
Returns whether this is the action for local destroy.
Definition: ExpirationAction.hpp:77
When expired, destroyed locally only.
Definition: ExpirationAction.hpp:38
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
static bool isDestroy(const Action type)
Returns whether this is the action for distributed destroy.
Definition: ExpirationAction.hpp:69
static bool isDistributed(const Action type)
Returns whether this action is distributed.
Definition: ExpirationAction.hpp:93
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
When the region or cached object expires, it is destroyed.
Definition: ExpirationAction.hpp:36
Enumerated type for expiration actions.
Definition: ExpirationAction.hpp:24
static bool isLocalInvalidate(const Action type)
Returns whether this is the action for local invalidate.
Definition: ExpirationAction.hpp:61

GemFire C++ Cache API Documentation