示例#1
0
        public IList <string> GetBucketNames()
        {
            IList <string> buckets = new List <string>();
            IList <string> names   = jsm.GetStreamNames();

            foreach (string name in names)
            {
                if (name.StartsWith(KeyValueUtil.KvStreamPrefix))
                {
                    buckets.Add(KeyValueUtil.ExtractBucketName(name));
                }
            }
            return(buckets);
        }
 /// <summary>
 /// Construct the builder by copying another configuration
 /// </summary>
 /// <param name="kvc">the other configuration</param>
 public KeyValueConfigurationBuilder(KeyValueConfiguration kvc)
 {
     if (kvc == null)
     {
         scBuilder = new StreamConfigurationBuilder();
         WithMaxHistoryPerKey(1);
         WithReplicas(1);
     }
     else
     {
         scBuilder = new StreamConfigurationBuilder(kvc.BackingConfig);
         _name     = KeyValueUtil.ExtractBucketName(kvc.BackingConfig.Name);
     }
 }
 internal KeyValueConfiguration(StreamConfiguration sc)
 {
     BackingConfig = sc;
     BucketName    = KeyValueUtil.ExtractBucketName(sc.Name);
 }