Example #1
0
        protected StringPropertyModel MapToString(string key)
        {
            var model = new StringPropertyModel(_config[key]);

            _mapping.Add(key, model);
            return(model);
        }
Example #2
0
 public ClusterNatSupportPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     ClusterAnnounceIp      = MapToString("cluster-announce-ip");
     ClusterAnnouncePort    = MapToString("cluster-announce-port");
     ClusterAnnounceBusPort = MapToString("cluster-announce-bus-port");
 }
Example #3
0
 public SnapshottingPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     SaveProperty            = MapToString("save");
     StopWritesOnBgSaveError = MapToYesNo("stop-writes-on-bgsave-error");
     RdbCompression          = MapToYesNo("rdbcompression");
     RdbChecksum             = MapToYesNo("rdbchecksum");
     DbFilename = MapToString("dbfilename");
     Dir        = MapToString("dir");
 }
Example #4
0
        public ReplicationPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
            base(endpoint, config)
        {
            var old =
                HasKey("slaveof") ||
                HasKey("slave-serve-stale-data") ||
                HasKey("slave-read-only") ||
                HasKey("slave-priority");

            ReplicaOf = old
                ? MapToString("slaveof")
                : MapToString("replicaof");

            MasterAuth = MapToString("masterauth");

            ReplicaServeStaleData = old
                ? MapToYesNo("slave-serve-stale-data")
                : MapToYesNo("replica-serve-stale-data");

            ReplicaReadOnly = old
                ? MapToYesNo("slave-read-only")
                : MapToYesNo("replica-read-only");

            ReplDisklessSync      = MapToYesNo("repl-diskless-sync");
            ReplDisklessSyncDelay = MapToString("repl-diskless-sync-delay");

            ReplPingReplicaPeriod = old
                ? MapToString("repl-ping-slave-period")
                : MapToString("repl-ping-replica-period");

            ReplTimeout           = MapToString("repl-timeout");
            ReplDisableTcpNodelay = MapToYesNo("repl-disable-tcp-nodelay");
            ReplBacklogSize       = MapToString("repl-backlog-size");
            ReplBacklogTtl        = MapToString("repl-backlog-ttl");

            ReplicaPriority = old
                ? MapToString("slave-priority")
                : MapToString("replica-priority");

            MinReplicasToWrite = old
                ? MapToString("min-slaves-to-write")
                : MapToString("min-replicas-to-write");

            MinReplicasMaxLag = old
                ? MapToString("min-slaves-max-lag")
                : MapToString("min-replicas-max-lag");

            ReplicaAnnounceIp = old
                ? MapToString("slave-announce-ip")
                : MapToString("replica-announce-ip");

            ReplicaAnnouncePort = old
                ? MapToString("slave-announce-port")
                : MapToString("replica-announce-port");
        }
Example #5
0
 public ActiveDefragmentationPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     ActiveDefrag               = MapToYesNo("activedefrag");
     ActiveDefragIgnoreBytes    = MapToString("active-defrag-ignore-bytes");
     ActiveDefragThresholdLower = MapToString("active-defrag-threshold-lower");
     ActiveDefragThresholdUpper = MapToString("active-defrag-threshold-upper");
     ActiveDefragCycleMin       = MapToString("active-defrag-cycle-min");
     ActiveDefragCycleMax       = MapToString("active-defrag-cycle-max");
     ActiveDefragMaxScanFields  = MapToString("active-defrag-max-scan-fields");
 }
Example #6
0
 public NetworkPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     Bind           = MapToString("bind");
     Port           = MapToString("port");
     ProtectedMode  = MapToYesNo("protected-mode");
     TcpBacklog     = MapToString("tcp-backlog");
     Unixsocket     = MapToString("unixsocket");
     Unixsocketperm = MapToString("unixsocketperm");
     Timeout        = MapToString("timeout");
     TcpKeepalive   = MapToString("tcp-keepalive");
 }
Example #7
0
 public AdvancedConfigPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     HashMaxZiplistEntries   = MapToString("hash-max-ziplist-entries");
     HashMaxZiplistValue     = MapToString("hash-max-ziplist-value");
     ListMaxZiplistSize      = MapToString("list-max-ziplist-size");
     ListCompressDepth       = MapToString("list-compress-depth");
     SetMaxIntsetEntries     = MapToString("set-max-intset-entries");
     ZsetMaxZiplistEntries   = MapToString("zset-max-ziplist-entries");
     ZsetMaxZiplistValue     = MapToString("zset-max-ziplist-value");
     HllSparseMaxBytes       = MapToString("hll-sparse-max-bytes");
     StreamNodeMaxBytes      = MapToString("stream-node-max-bytes");
     StreamNodeMaxEntries    = MapToString("stream-node-max-entries");
     ActiveRehashing         = MapToYesNo("activerehashing");
     ClientOutputBufferLimit = MapToString("client-output-buffer-limit");
     ClientQueryBufferLimit  = MapToString("client-query-buffer-limit");
     ProtoMaxBulkLen         = MapToString("proto-max-bulk-len");
     Hz        = MapToString("hz");
     DynamicHz = MapToYesNo("dynamic-hz");
     AofRewriteIncrementalFsync = MapToYesNo("aof-rewrite-incremental-fsync");
     RdbSaveIncrementalFsync    = MapToYesNo("rdb-save-incremental-fsync");
     LfuLogFactor = MapToString("lfu-log-factor");
     LfuDecayTime = MapToString("lfu-decay-time");
 }
Example #8
0
 public ClientsPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     MaxClients = MapToString("maxclients");
 }
Example #9
0
 public SlowLogPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     SlowlogLogSlowerThan = MapToString("slowlog-log-slower-than");
     SlowlogMaxLen        = MapToString("slowlog-max-len");
 }
Example #10
0
 public EventNotificationPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     NotifyKeyspaceEvents = MapToString("notify-keyspace-events");
 }
Example #11
0
 public LatencyMonitorPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     LatencyMonitorThreshold = MapToString("latency-monitor-threshold");
 }
Example #12
0
 public SecurityPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     Password = MapToString("requirepass");
 }
Example #13
0
 public LuaScriptingPropertyPageModel(EndpointEntry endpoint, Dictionary <string, ConfigKeyValue> config) :
     base(endpoint, config)
 {
     LuaTimeLimit = MapToString("lua-time-limit");
 }