Hazelcast C++ Client
IFuture.h
1 /*
2  * Copyright (c) 2008-2019, 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 #ifndef HAZELCAST_CLIENT_IFUTURE_H_
17 #define HAZELCAST_CLIENT_IFUTURE_H_
18 
19 #include <boost/shared_ptr.hpp>
20 
21 #include "hazelcast/client/exception/InterruptedException.h"
22 #include "hazelcast/util/concurrent/TimeUnit.h"
23 
24 using namespace hazelcast::client;
25 using namespace hazelcast::util::concurrent;
26 
27 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
28 #pragma warning(push)
29 #pragma warning(disable: 4251) //for dll export
30 #endif
31 
32 namespace hazelcast {
33  namespace client {
34 
49  template<typename V>
50  class IFuture {
51  public:
52  virtual ~IFuture() {
53  }
54 
76  virtual bool cancel(bool mayInterruptIfRunning) = 0;
77 
84  virtual bool isCancelled() = 0;
85 
95  virtual bool isDone() = 0;
96 
108  virtual boost::shared_ptr<V> get() = 0;
109 
124  virtual boost::shared_ptr<V> get(int64_t timeout,
125  const TimeUnit &unit) = 0;
126 
127  };
128  }
129 }
130 
131 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
132 #pragma warning(pop)
133 #endif
134 
135 #endif /* HAZELCAST_CLIENT_IFUTURE_H_ */
Definition: MapEntryView.h:33
A.
Definition: IFuture.h:50
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32