Exemplo n.º 1
0
        protected YesNoPropertyModel MapToYesNo(string key)
        {
            var model = new YesNoPropertyModel(_config[key]);

            _mapping.Add(key, model);
            return(model);
        }
Exemplo n.º 2
0
 public MemoryManagementPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     Maxmemory              = MapToString("maxmemory");
     MaxmemoryPolicy        = MapToString("maxmemory-policy");
     MaxmemorySamples       = MapToString("maxmemory-samples");
     ReplicaIgnoreMaxmemory = HasKey("slave-ignore-maxmemory")
         ? MapToYesNo("slave-ignore-maxmemory")
         : MapToYesNo("replica-ignore-maxmemory");
 }
Exemplo n.º 3
0
 public LazyFreeingPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     LazyfreeLazyEviction  = MapToYesNo("lazyfree-lazy-eviction");
     LazyfreeLazyExpire    = MapToYesNo("lazyfree-lazy-expire");
     LazyfreeLazyServerDel = MapToYesNo("lazyfree-lazy-server-del");
     ReplicaLazyFlush      = HasKey("slave-lazy-flush")
         ? MapToYesNo("slave-lazy-flush")
         : MapToYesNo("replica-lazy-flush");
 }
Exemplo n.º 4
0
 public AppendOnlyModePropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     AppendOnly               = MapToYesNo("appendonly");
     AppendFilename           = MapToString("appendfilename");
     AppendFsync              = MapToString("appendfsync");
     NoAppendFsyncOnRewrite   = MapToYesNo("no-appendfsync-on-rewrite");
     AutoAofRewritePercentage = MapToString("auto-aof-rewrite-percentage");
     AutoAofRewriteMinSize    = MapToString("auto-aof-rewrite-min-size");
     AofLoadTruncated         = MapToYesNo("aof-load-truncated");
     AofUseRdbPreamble        = MapToYesNo("aof-use-rdb-preamble");
 }
Exemplo n.º 5
0
 public GeneralPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     Daemonize      = MapToYesNo("daemonize");
     Supervised     = MapToString("supervised");
     Pidfile        = MapToString("pidfile");
     Loglevel       = MapToString("loglevel");
     Logfile        = MapToString("logfile");
     SyslogEnabled  = MapToYesNo("syslog-enabled");
     SyslogIdent    = MapToString("syslog-ident");
     SyslogFacility = MapToString("syslog-facility");
     Databases      = MapToString("databases");
     AlwaysShowLogo = MapToYesNo("always-show-logo");
 }
Exemplo n.º 6
0
        public RedisClusterPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
            base(endpoint, config)
        {
            var old =
                HasKey("cluster-slave-no-failover") ||
                HasKey("cluster-slave-validity-factor");

            ClusterEnabled               = MapToYesNo("cluster-enabled");
            ClusterConfigFile            = MapToString("cluster-config-file");
            ClusterNodeTimeout           = MapToString("cluster-node-timeout");
            ClusterReplicaValidityFactor = old
                ? MapToString("cluster-slave-validity-factor")
                : MapToString("cluster-replica-validity-factor");
            ClusterMigrationBarrier    = MapToString("cluster-migration-barrier");
            ClusterRequireFullCoverage = MapToYesNo("cluster-require-full-coverage");
            ClusterReplicaNoFailover   = old
                ? MapToYesNo("cluster-slave-no-failover")
                : MapToYesNo("cluster-replica-no-failover");
        }