VMware Tanzu GemFire Native C++ Reference
10.1.5
|
Go to the documentation of this file.
20 #ifndef GEODE_CACHEABLEOBJECTARRAY_H_
21 #define GEODE_CACHEABLEOBJECTARRAY_H_
26 #include "Serializable.hpp"
27 #include "internal/DSCode.hpp"
28 #include "internal/DataSerializablePrimitive.hpp"
29 #include "internal/geode_globals.hpp"
48 :
public internal::DataSerializablePrimitive,
49 public std::vector<std::shared_ptr<Cacheable>> {
56 : std::vector<std::shared_ptr<
Cacheable>>(n) {}
63 void toData(
DataOutput& output) const override;
65 virtual
void fromData(
DataInput& input) override;
70 inline static std::shared_ptr<
Serializable> createDeserializable() {
71 return std::make_shared<CacheableObjectArray>();
74 internal::DSCode getDsCode()
const override {
75 return internal::DSCode::CacheableObjectArray;
81 inline static std::shared_ptr<CacheableObjectArray>
create() {
82 return std::make_shared<CacheableObjectArray>();
89 inline static std::shared_ptr<CacheableObjectArray>
create(int32_t n) {
90 return std::make_shared<CacheableObjectArray>(n);
93 virtual size_t objectSize()
const override;
100 #endif // GEODE_CACHEABLEOBJECTARRAY_H_
CacheableObjectArray(int32_t n)
Create a vector with n elements allocated.
Definition: CacheableObjectArray.hpp:55
static std::shared_ptr< CacheableObjectArray > create(int32_t n)
Factory method for creating an instance of CacheableObjectArray with given size.
Definition: CacheableObjectArray.hpp:89
Implements an immutable Vector of Cacheable objects that can serve as a distributable object for cach...
Definition: CacheableObjectArray.hpp:49
This base class is the superclass of all user objects in the cache that can be serialized.
Definition: Serializable.hpp:53
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition: DataOutput.hpp:48
Provide operations for reading primitive data values, byte arrays, strings, Serializable objects from...
Definition: DataInput.hpp:59
CacheableObjectArray()
Constructor, used for deserialization.
Definition: CacheableObjectArray.hpp:52
static std::shared_ptr< CacheableObjectArray > create()
Factory method for creating the default instance of CacheableObjectArray.
Definition: CacheableObjectArray.hpp:81
Apache Geode C++ Cache API Documentation