Beispiel #1
0
 public void Deserialize(Runtime.Serialization.IO.CompactReader reader)
 {
     mode         = reader.ReadObject() as string;
     throttling   = reader.ReadObject() as string;
     batchConfig  = reader.ReadObject() as BatchConfig;
     eviction     = reader.ReadObject() as string;
     requeueLimit = reader.ReadObject() as string;
 }
Beispiel #2
0
        public object Clone()
        {
            BatchConfig config = new BatchConfig();

            config.BatchInterval  = BatchInterval != null ? (string)BatchInterval.Clone() : null;
            config.OperationDelay = OperationDelay != null ? (string)OperationDelay.Clone() : null;
            return(config);
        }
Beispiel #3
0
            private static BatchConfig GetBatchConfig(Hashtable settings)
            {
                if (settings == null)
                {
                    return(null);
                }

                BatchConfig batchConfig = new BatchConfig();

                if (settings.ContainsKey("batch-interval"))
                {
                    batchConfig.BatchInterval = settings["batch-interval"].ToString();
                }
                if (settings.ContainsKey("operation-delay"))
                {
                    batchConfig.OperationDelay = settings["operation-delay"].ToString();
                }

                return(batchConfig);
            }