Hazelcast C++ Client
DataArray.h
1 /*
2  * Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 //
17 // Created by ihsan demir on 25 02, 2016.
18 //
19 #ifndef HAZELCAST_CLIENT_DATAARRAY_H_
20 #define HAZELCAST_CLIENT_DATAARRAY_H_
21 
22 #include "hazelcast/client/exception/IllegalArgumentException.h"
23 #include "hazelcast/client/serialization/pimpl/SerializationService.h"
24 
25 namespace hazelcast {
26  namespace client {
27  template<typename T>
28  class DataArray {
29  public:
30  virtual ~DataArray() { }
31 
35  virtual size_t size() const = 0;
36 
45  virtual const T *get(size_t index) = 0;
46 
54  virtual std::auto_ptr<T> release(size_t index) = 0;
55 
64  virtual const T* operator[](size_t index) = 0;
65  };
66  }
67 }
68 
69 #endif //HAZELCAST_CLIENT_DATAARRAY_H_
70 
virtual const T * operator[](size_t index)=0
Please note that this operation MAY (if the de-serialization is not done before) be costly due to de-...
virtual size_t size() const =0
Definition: DataArray.h:28
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32
virtual std::auto_ptr< T > release(size_t index)=0
Will release the de-serialized data.