Cacheable objects that can serve as a distributable object for caching. Public Member Functions | |
| const PTR_TYPE | at (int32_t n) const |
| Return the n'th element with bounds checking. | |
| PTR_TYPE | at (int32_t n) |
| Return the n'th element with bounds checking. | |
| const PTR_TYPE | back () const |
| returns the last element. | |
| PTR_TYPE | back () |
| returns the last element. | |
| Iterator | begin () const |
| Get an iterator pointing to the start of vector. | |
| int32_t | capacity () const |
| return the number of elements allocated for this vector. | |
| virtual int32_t | classId () const |
| void | clear () |
| erases all elements. | |
| virtual int8_t | DSFID () const |
| bool | empty () const |
| return true if the vector's size is 0. | |
| Iterator | end () const |
| Get an iterator pointing to the end of vector. | |
| void | erase (int32_t index) |
| Removes the object at the specified index from a vector. | |
| virtual Serializable * | fromData (DataInput &input) |
| const PTR_TYPE | front () const |
| returns the first element. | |
| PTR_TYPE | front () |
| returns the first element. | |
| void | insert (int32_t index, const PTR_TYPE &t) |
| insert object at the given position. | |
| int32_t | length () const |
| synonym for size. | |
| int32_t | max_size () const |
| return the largest possible size of the vector. | |
| virtual uint32_t | objectSize () const |
| const PTR_TYPE | operator[] (int32_t n) const |
| Return the n'th element. | |
| PTR_TYPE | operator[] (int32_t n) |
| Return the n'th element. | |
| void | pop_back () |
| removes the last element. | |
| void | preserveSB () const |
| Atomically increment reference count. | |
| void | push_back (const PTR_TYPE &e) |
| insert a new element at the end. | |
| int32_t | refCount () |
| |
| void | releaseSB () const |
| Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. | |
| void | reserve (int32_t n) |
| reallocate a vector to hold n elements. | |
| void | resize (int32_t n, const PTR_TYPE &t=gemfire::NullSharedBase::s_instancePtr) |
| inserts or erases elements at the end such that size becomes n. | |
| int32_t | size () const |
| return the size of the vector. | |
| void | swap (VectorT &other) |
| swaps the contents of two vectors. | |
| virtual void | toData (DataOutput &output) const |
| virtual CacheableStringPtr | toString () const |
| Display this object as 'string', which depends on the implementation in the subclasses. | |
| virtual int8_t | typeId () const |
Static Public Member Functions | |
| template<class PRIM> | |
| static SerializablePtr | create (const PRIM value) |
| Factory method that creates the Serializable object that matches the type of value. | |
| static CacheableObjectArrayPtr | create (int32_t n) |
| Factory method for creating an instance of CacheableObjectArray with given size. | |
| static CacheableObjectArrayPtr | create () |
| Factory method for creating the default instance of CacheableObjectArray. | |
| static Serializable * | createDeserializable () |
| static void | registerPdxSerializer (PdxSerializerPtr pdxSerializer) |
| Register the PDX serializer which can handle serialization for instances of user domain classes. | |
| static void | registerPdxType (TypeFactoryMethodPdx creationFunction) |
| static void | registerType (TypeFactoryMethod creationFunction) |
Protected Member Functions | |
| CacheableObjectArray (int32_t n) | |
| Create a vector with n elements allocated. | |
| CacheableObjectArray () | |
| Constructor, used for deserialization. | |
| gemfire::CacheableObjectArray::CacheableObjectArray | ( | ) | [inline, protected] |
Constructor, used for deserialization.
| gemfire::CacheableObjectArray::CacheableObjectArray | ( | int32_t | n | ) | [inline, protected] |
Create a vector with n elements allocated.
| const PTR_TYPE gemfire::VectorT< PTR_TYPE >::at | ( | int32_t | n | ) | const [inline, inherited] |
Return the n'th element with bounds checking.
| PTR_TYPE gemfire::VectorT< PTR_TYPE >::at | ( | int32_t | n | ) | [inline, inherited] |
Return the n'th element with bounds checking.
| const PTR_TYPE gemfire::VectorT< PTR_TYPE >::back | ( | ) | const [inline, inherited] |
returns the last element.
| PTR_TYPE gemfire::VectorT< PTR_TYPE >::back | ( | ) | [inline, inherited] |
returns the last element.
| Iterator gemfire::VectorT< PTR_TYPE >::begin | ( | ) | const [inline, inherited] |
Get an iterator pointing to the start of vector.
| int32_t gemfire::VectorT< PTR_TYPE >::capacity | ( | ) | const [inline, inherited] |
return the number of elements allocated for this vector.
| virtual int32_t gemfire::CacheableObjectArray::classId | ( | ) | const [virtual] |
Return the classId of the instance being serialized. This is used by deserialization to determine what instance type to create and deserialize into.
Implements gemfire::Serializable.
| void gemfire::VectorT< PTR_TYPE >::clear | ( | ) | [inline, inherited] |
erases all elements.
| static SerializablePtr gemfire::Serializable::create | ( | const PRIM | value | ) | [inline, static, inherited] |
Factory method that creates the Serializable object that matches the type of value.
For customer defined derivations of Serializable, the method gemfire::createValue may be overloaded. For pointer types (e.g. char*) the method gemfire::createValueArr may be overloaded.
Reimplemented in gemfire::CacheableKey.
| static CacheableObjectArrayPtr gemfire::CacheableObjectArray::create | ( | int32_t | n | ) | [inline, static] |
Factory method for creating an instance of CacheableObjectArray with given size.
| static CacheableObjectArrayPtr gemfire::CacheableObjectArray::create | ( | ) | [inline, static] |
Factory method for creating the default instance of CacheableObjectArray.
| static Serializable* gemfire::CacheableObjectArray::createDeserializable | ( | ) | [inline, static] |
creation function for java Object[]
| virtual int8_t gemfire::Serializable::DSFID | ( | ) | const [virtual, inherited] |
return the Data Serialization Fixed ID type. This is used to determine what instance type to create and deserialize into.
Note that this should not be overridden by custom implementations and is reserved only for builtin types.
Reimplemented in gemfire::CacheableUndefined, and gemfire::Struct.
| bool gemfire::VectorT< PTR_TYPE >::empty | ( | ) | const [inline, inherited] |
return true if the vector's size is 0.
| Iterator gemfire::VectorT< PTR_TYPE >::end | ( | ) | const [inline, inherited] |
Get an iterator pointing to the end of vector.
| void gemfire::VectorT< PTR_TYPE >::erase | ( | int32_t | index | ) | [inline, inherited] |
Removes the object at the specified index from a vector.
| virtual Serializable* gemfire::CacheableObjectArray::fromData | ( | DataInput & | input | ) | [virtual] |
deserialize this object
Implements gemfire::Serializable.
| const PTR_TYPE gemfire::VectorT< PTR_TYPE >::front | ( | ) | const [inline, inherited] |
returns the first element.
| PTR_TYPE gemfire::VectorT< PTR_TYPE >::front | ( | ) | [inline, inherited] |
returns the first element.
| void gemfire::VectorT< PTR_TYPE >::insert | ( | int32_t | index, | |
| const PTR_TYPE & | t | |||
| ) | [inline, inherited] |
insert object at the given position.
| int32_t gemfire::VectorT< PTR_TYPE >::length | ( | ) | const [inline, inherited] |
synonym for size.
| int32_t gemfire::VectorT< PTR_TYPE >::max_size | ( | ) | const [inline, inherited] |
return the largest possible size of the vector.
| virtual uint32_t gemfire::CacheableObjectArray::objectSize | ( | ) | const [virtual] |
return the size in bytes of the instance being serialized. This is used to determine whether the cache is using up more physical memory than it has been configured to use. The method can return zero if the user does not require the ability to control cache memory utilization. Note that you must implement this only if you use the HeapLRU feature.
Reimplemented from gemfire::Serializable.
| const PTR_TYPE gemfire::VectorT< PTR_TYPE >::operator[] | ( | int32_t | n | ) | const [inline, inherited] |
Return the n'th element.
| PTR_TYPE gemfire::VectorT< PTR_TYPE >::operator[] | ( | int32_t | n | ) | [inline, inherited] |
Return the n'th element.
| void gemfire::VectorT< PTR_TYPE >::pop_back | ( | ) | [inline, inherited] |
removes the last element.
| void gemfire::SharedBase::preserveSB | ( | ) | const [inherited] |
Atomically increment reference count.
| void gemfire::VectorT< PTR_TYPE >::push_back | ( | const PTR_TYPE & | e | ) | [inline, inherited] |
insert a new element at the end.
| int32_t gemfire::SharedBase::refCount | ( | ) | [inline, inherited] |
| static void gemfire::Serializable::registerPdxSerializer | ( | PdxSerializerPtr | pdxSerializer | ) | [static, inherited] |
Register the PDX serializer which can handle serialization for instances of user domain classes.
| static void gemfire::Serializable::registerPdxType | ( | TypeFactoryMethodPdx | creationFunction | ) | [static, inherited] |
register an Pdx instance factory method for a given type.
| IllegalStateException | if the typeName has already been registered, or there is an error in registering the type; check errno for more information in the latter case. |
| static void gemfire::Serializable::registerType | ( | TypeFactoryMethod | creationFunction | ) | [static, inherited] |
register an instance factory method for a given type. During registration the factory will be invoked to extract the typeId to associate with this function.
| IllegalStateException | if the typeId has already been registered, or there is an error in registering the type; check errno for more information in the latter case. |
| void gemfire::SharedBase::releaseSB | ( | ) | const [inherited] |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
| void gemfire::VectorT< PTR_TYPE >::reserve | ( | int32_t | n | ) | [inline, inherited] |
reallocate a vector to hold n elements.
| void gemfire::VectorT< PTR_TYPE >::resize | ( | int32_t | n, | |
| const PTR_TYPE & | t = gemfire::NullSharedBase::s_instancePtr | |||
| ) | [inline, inherited] |
inserts or erases elements at the end such that size becomes n.
Not to be confused with reserve which simply allocates the space, resize fills the space with active elements.
| int32_t gemfire::VectorT< PTR_TYPE >::size | ( | ) | const [inline, inherited] |
return the size of the vector.
| void gemfire::VectorT< PTR_TYPE >::swap | ( | VectorT< PTR_TYPE > & | other | ) | [inline, inherited] |
swaps the contents of two vectors.
| virtual void gemfire::CacheableObjectArray::toData | ( | DataOutput & | output | ) | const [virtual] |
serialize this object
Implements gemfire::Serializable.
| virtual CacheableStringPtr gemfire::Serializable::toString | ( | ) | const [virtual, inherited] |
Display this object as 'string', which depends on the implementation in the subclasses.
The default implementation renders the classname.
The return value may be a temporary, so the caller has to ensure that the SharedPtr count does not go down to zero by storing the result in a variable or otherwise.
Reimplemented in gemfire::CacheableKeyType< TObj, TYPEID, TYPENAME, SPRINTFSYM, STRSIZE >, gemfire::CacheableDate, gemfire::CacheableEnum, and gemfire::CacheableString.
| virtual int8_t gemfire::CacheableObjectArray::typeId | ( | ) | const [virtual] |
return the typeId byte of the instance being serialized. This is used by deserialization to determine what instance type to create and deserialize into.
Reimplemented from gemfire::Serializable.