ToJsonString() public method

public ToJsonString ( ) : string
return string
コード例 #1
0
 internal void RegisterConsumerInZk(ZKGroupDirs dirs, string consumerIdString, TopicCount topicCount)
 {
     this.EnsuresNotDisposed();
     Logger.InfoFormat(CultureInfo.CurrentCulture, "begin registering consumer {0} in ZK", consumerIdString);
     ZkUtils.CreateEphemeralPathExpectConflict(this.zkClient, dirs.ConsumerRegistryDir + "/" + consumerIdString, topicCount.ToJsonString());
     Logger.InfoFormat(CultureInfo.CurrentCulture, "end registering consumer {0} in ZK", consumerIdString);
 }
コード例 #2
0
 internal void RegisterConsumerInZk(ZKGroupDirs dirs, string consumerIdString, TopicCount topicCount)
 {
     this.EnsuresNotDisposed();
     Logger.InfoFormat(CultureInfo.CurrentCulture, "begin registering consumer {0} in ZK", consumerIdString);
     ZkUtils.CreateEphemeralPathExpectConflict(this.zkClient, dirs.ConsumerRegistryDir + "/" + consumerIdString, topicCount.ToJsonString());
     Logger.InfoFormat(CultureInfo.CurrentCulture, "end registering consumer {0} in ZK", consumerIdString);
 }
コード例 #3
0
 internal void RegisterConsumerInZk(ZKGroupDirs dirs, string consumerIdString, TopicCount topicCount)
 {
     this.EnsuresNotDisposed();
     Logger.InfoFormat("begin registering consumer {0} in ZK", consumerIdString);
     try
     {
         this.GetZkClient().SlimLock.EnterWriteLock();
         ZkUtils.CreateEphemeralPathExpectConflict(this.GetZkClient(), dirs.ConsumerRegistryDir + "/" + consumerIdString, topicCount.ToJsonString());
         Logger.InfoFormat("successfully registering consumer {0} in ZK", consumerIdString);
     }
     catch (Exception ex)
     {
         Logger.ErrorFormat("error in RegisterConsumerInZk CreateEphemeralPathExpectConflict : {0}", ex.FormatException());
     }
     finally
     {
         GetZkClient().SlimLock.ExitWriteLock();
     }
 }