Exemplo n.º 1
0
 public static Boolean isClusterEnv(Sequoiadb sdb)
 {
     try
     {
         sdb.ListReplicaGroups();
     }
     catch (BaseException e)
     {
         int errcode = e.ErrorCode;
         if (new BaseException("SDB_RTN_COORD_ONLY").ErrorCode == errcode)
         {
             return(false);
         }
         else
         {
             throw e;
         }
     }
     catch (System.Exception e)
     {
         Console.WriteLine(e.StackTrace);
         Environment.Exit(0);
     }
     return(true);
 }
Exemplo n.º 2
0
 public static Boolean isClusterEnv(Sequoiadb sdb)
 {
     try
     {
         sdb.ListReplicaGroups();
     }
     catch (BaseException e)
     {
         int errcode = e.ErrorCode;
         if (new BaseException("SDB_RTN_COORD_ONLY").ErrorCode == errcode)
             return false;
         else
             throw e;
     }
     catch (System.Exception e)
     {
         Console.WriteLine(e.StackTrace);
         Environment.Exit(0);
     }
     return true;
 }