Apache Geode Native C++ Reference 1.15.0
AuthenticatedView.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#pragma once
19
20#ifndef GEODE_AUTHENTICATEDVIEW_H_
21#define GEODE_AUTHENTICATEDVIEW_H_
22
23#include <geode/PoolFactory.hpp>
25#include <geode/Region.hpp>
26#include <geode/RegionService.hpp>
27#include <geode/internal/geode_globals.hpp>
28
33namespace apache {
34namespace geode {
35namespace client {
36
37class GuardUserAttributes;
38class UserAttributes;
39class FunctionServiceImpl;
40
46class APACHE_GEODE_EXPORT AuthenticatedView : public RegionService {
50 public:
59 bool isClosed() const override;
60
68 void close() override;
69
74 std::shared_ptr<Region> getRegion(const std::string& path) const override;
75
81 std::shared_ptr<QueryService> getQueryService() override;
82
88 std::vector<std::shared_ptr<Region>> rootRegions() const override;
89
90 ~AuthenticatedView() override;
91
92 AuthenticatedView(std::shared_ptr<Properties> credentials,
93 std::shared_ptr<Pool> pool, CacheImpl* cacheImpl);
94 AuthenticatedView(AuthenticatedView&& other) = default;
95 AuthenticatedView(const AuthenticatedView& other) = delete;
96
106 const std::string& className, bool expectDomainClass) const override;
107
115 const std::string& className) const override;
116
117 AuthenticatedView& operator=(AuthenticatedView&& other) = default;
118 AuthenticatedView& operator=(const AuthenticatedView& other) = delete;
119
120 private:
121 std::shared_ptr<UserAttributes> m_userAttributes;
122 bool m_isAuthenticatedViewClosed;
123 std::shared_ptr<QueryService> m_remoteQueryService;
124 CacheImpl* m_cacheImpl;
125
126 friend class Pool;
127 friend class ProxyRegion;
128 friend class ProxyRemoteQueryService;
129 friend class RemoteQuery;
130 friend class ExecutionImpl;
131 friend class FunctionServiceImpl;
132 friend class FunctionService;
133 friend class GuardUserAttributes;
134 friend class CacheRegionHelper;
135};
136} // namespace client
137} // namespace geode
138} // namespace apache
139
140#endif // GEODE_AUTHENTICATEDVIEW_H_
Creates an authenticated cache view to allow credential based access to region services.
Definition: AuthenticatedView.hpp:46
PdxInstanceFactory createPdxInstanceFactory(const std::string &className) const override
Returns a factory that can create a PdxInstance.
std::shared_ptr< Region > getRegion(const std::string &path) const override
Look up a region with the full path from root.
std::vector< std::shared_ptr< Region > > rootRegions() const override
Returns a set of root regions in the cache.
std::shared_ptr< QueryService > getQueryService() override
Gets the QueryService from which a new Query can be obtained.
PdxInstanceFactory createPdxInstanceFactory(const std::string &className, bool expectDomainClass) const override
Returns a factory that can create a PdxInstance.
void close() override
Terminates this object cache and releases all the local resources.
bool isClosed() const override
public methods
entry point for function execution
Definition: FunctionService.hpp:45
PdxInstanceFactory gives you a way to create PdxInstances.
Definition: PdxInstanceFactory.hpp:52
A pool of connections to connect from a client to a set of Geode Cache Servers.
Definition: Pool.hpp:59
A RegionService provides access to existing regions that exist in a Geode cache.
Definition: RegionService.hpp:58

Apache Geode C++ Cache API Documentation