VMware VMware GemFire Native C++ Reference 10.4.3
Loading...
Searching...
No Matches
CacheableFileName.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_CACHEABLEFILENAME_H_
21#define GEODE_CACHEABLEFILENAME_H_
22
23#include <memory>
24
25#include "CacheableKey.hpp"
26#include "CacheableString.hpp"
27#include "internal/geode_globals.hpp"
28
32namespace apache {
33namespace geode {
34namespace client {
35
36class DataInput;
37class DataOutput;
38class Serializable;
39
45class APACHE_GEODE_EXPORT CacheableFileName : public CacheableString {
46 public:
47 CacheableFileName() = default;
48 explicit CacheableFileName(const std::string& value)
49 : CacheableString(value) {}
50 explicit CacheableFileName(std::string&& value)
51 : CacheableString(std::move(value)) {}
52 ~CacheableFileName() noexcept override = default;
53 void operator=(const CacheableFileName& other) = delete;
54 CacheableFileName(const CacheableFileName& other) = delete;
55
56 void toData(DataOutput& output) const override;
57
58 virtual void fromData(DataInput& input) override;
59
60 virtual DSCode getDsCode() const override;
61
65 static std::shared_ptr<Serializable> createDeserializable() {
66 return std::make_shared<CacheableFileName>();
67 }
68
73 static std::shared_ptr<CacheableFileName> create(const std::string& value) {
74 return std::make_shared<CacheableFileName>(value);
75 }
76
78 virtual int32_t hashcode() const override;
79};
80
81} // namespace client
82} // namespace geode
83} // namespace apache
84
85#endif // GEODE_CACHEABLEFILENAME_H_
Implements an immutable wrapper for filenames that can serve as a distributable filename object for c...
Definition CacheableFileName.hpp:45
static std::shared_ptr< Serializable > createDeserializable()
creation function for filenames.
Definition CacheableFileName.hpp:65
virtual int32_t hashcode() const override
return the hashcode for this key.
static std::shared_ptr< CacheableFileName > create(const std::string &value)
Factory method for creating an instance of CacheableFileName from a C string optionally given the len...
Definition CacheableFileName.hpp:73
Implement a immutable C string wrapper that can serve as a distributable key object for caching as we...
Definition CacheableString.hpp:40
Provide operations for reading primitive data values, byte arrays, strings, Serializable objects from...
Definition DataInput.hpp:59
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition DataOutput.hpp:48

Apache Geode C++ Cache API Documentation