~codership/galera/3.x

« back to all changes in this revision

Viewing changes to gcache/src/GCache.hpp

  • Committer: Alexey Yurchenko
  • Date: 2014-02-06 19:27:50 UTC
  • mfrom: (153.2.15 2.x)
  • Revision ID: alexey.yurchenko@codership.com-20140206192750-n9to0wtjevl69gok
Tags: release_25.3.3(percona)
References lp:1260193 - all supported parameters are now registered before parsing the initial options string, so unrecognized options can be detected.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2009-2013 Codership Oy <info@codership.com>
 
2
 * Copyright (C) 2009-2014 Codership Oy <info@codership.com>
3
3
 */
4
4
 
5
5
#ifndef __GCACHE_H__
24
24
 
25
25
    class GCache : public MemOps
26
26
    {
27
 
 
28
27
    public:
29
28
 
 
29
        static void register_params(gu::Config& cfg)
 
30
        {
 
31
            Params::register_params(cfg);
 
32
        }
 
33
 
30
34
        /*!
31
35
         * Creates a new gcache file in "gcache.name" conf parameter or
32
36
         * in data_dir. If file already exists, it gets overwritten.
205
209
        class Params
206
210
        {
207
211
        public:
 
212
 
 
213
            static void register_params(gu::Config&);
 
214
 
208
215
            Params(gu::Config&, const std::string&);
209
 
            std::string const rb_name;
210
 
            std::string const dir_name;
211
 
            ssize_t           mem_size;
212
 
            ssize_t     const rb_size;
213
 
            ssize_t           page_size;
214
 
            ssize_t           keep_pages_size;
 
216
 
 
217
            const std::string& rb_name()  const { return rb_name_;  }
 
218
            const std::string& dir_name() const { return dir_name_; }
 
219
 
 
220
            ssize_t mem_size()            const { return mem_size_;        }
 
221
            ssize_t rb_size()             const { return rb_size_;         }
 
222
            ssize_t page_size()           const { return page_size_;       }
 
223
            ssize_t keep_pages_size()     const { return keep_pages_size_; }
 
224
 
 
225
            void mem_size        (ssize_t s) { mem_size_        = s; }
 
226
            void page_size       (ssize_t s) { page_size_       = s; }
 
227
            void keep_pages_size (ssize_t s) { keep_pages_size_ = s; }
 
228
 
 
229
        private:
 
230
 
 
231
            std::string const rb_name_;
 
232
            std::string const dir_name_;
 
233
            ssize_t           mem_size_;
 
234
            ssize_t     const rb_size_;
 
235
            ssize_t           page_size_;
 
236
            ssize_t           keep_pages_size_;
215
237
        }
216
238
            params;
217
239