本文整理汇总了C#中Apache.Cassandra.UnavailableException类的典型用法代码示例。如果您正苦于以下问题:C# UnavailableException类的具体用法?C# UnavailableException怎么用?C# UnavailableException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnavailableException类属于Apache.Cassandra命名空间,在下文中一共展示了UnavailableException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 0:
if (field.Type == TType.Map) {
{
Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
TMap _map91 = iprot.ReadMapBegin();
for( int _i92 = 0; _i92 < _map91.Count; ++_i92)
{
byte[] _key93;
List<ColumnOrSuperColumn> _val94;
_key93 = iprot.ReadBinary();
{
_val94 = new List<ColumnOrSuperColumn>();
TList _list95 = iprot.ReadListBegin();
for( int _i96 = 0; _i96 < _list95.Count; ++_i96)
{
ColumnOrSuperColumn _elem97 = new ColumnOrSuperColumn();
_elem97 = new ColumnOrSuperColumn();
_elem97.Read(iprot);
_val94.Add(_elem97);
}
iprot.ReadListEnd();
}
Success[_key93] = _val94;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 1:
if (field.Type == TType.Struct) {
Ire = new InvalidRequestException();
Ire.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
Ue = new UnavailableException();
Ue.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Struct) {
Te = new TimedOutException();
Te.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例2: Read
public void Read(TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 0:
if (field.Type == TType.Map) {
{
Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
TMap _map46 = iprot.ReadMapBegin();
for( int _i47 = 0; _i47 < _map46.Count; ++_i47)
{
byte[] _key48;
List<ColumnOrSuperColumn> _val49;
_key48 = iprot.ReadBinary();
{
_val49 = new List<ColumnOrSuperColumn>();
TList _list50 = iprot.ReadListBegin();
for( int _i51 = 0; _i51 < _list50.Count; ++_i51)
{
ColumnOrSuperColumn _elem52 = new ColumnOrSuperColumn();
_elem52 = new ColumnOrSuperColumn();
_elem52.Read(iprot);
_val49.Add(_elem52);
}
iprot.ReadListEnd();
}
Success[_key48] = _val49;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 1:
if (field.Type == TType.Struct) {
Ire = new InvalidRequestException();
Ire.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
Ue = new UnavailableException();
Ue.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Struct) {
Te = new TimedOutException();
Te.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例3: CassandraOperationException
public CassandraOperationException(UnavailableException exc)
: base("Cassandra server is unavailable.", exc)
{
}
示例4: Read
public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 0:
if (field.Type == TType.Map) {
{
Success = new Dictionary<byte[], List<ColumnOrSuperColumn>>();
TMap _map103 = iprot.ReadMapBegin();
for( int _i104 = 0; _i104 < _map103.Count; ++_i104)
{
byte[] _key105;
List<ColumnOrSuperColumn> _val106;
_key105 = iprot.ReadBinary();
{
_val106 = new List<ColumnOrSuperColumn>();
TList _list107 = iprot.ReadListBegin();
for( int _i108 = 0; _i108 < _list107.Count; ++_i108)
{
ColumnOrSuperColumn _elem109 = new ColumnOrSuperColumn();
_elem109 = new ColumnOrSuperColumn();
_elem109.Read(iprot);
_val106.Add(_elem109);
}
iprot.ReadListEnd();
}
Success[_key105] = _val106;
}
iprot.ReadMapEnd();
}
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 1:
if (field.Type == TType.Struct) {
Ire = new InvalidRequestException();
Ire.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
Ue = new UnavailableException();
Ue.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Struct) {
Te = new TimedOutException();
Te.Read(iprot);
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例5: Read
public void Read(TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 0:
if (field.Type == TType.Map) {
{
this.success = new Dictionary<string, ColumnOrSuperColumn>();
TMap _map29 = iprot.ReadMapBegin();
for( int _i30 = 0; _i30 < _map29.Count; ++_i30)
{
string _key31;
ColumnOrSuperColumn _val32;
_key31 = iprot.ReadString();
_val32 = new ColumnOrSuperColumn();
_val32.Read(iprot);
this.success[_key31] = _val32;
}
iprot.ReadMapEnd();
}
this.__isset.success = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 1:
if (field.Type == TType.Struct) {
this.ire = new InvalidRequestException();
this.ire.Read(iprot);
this.__isset.ire = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
this.ue = new UnavailableException();
this.ue.Read(iprot);
this.__isset.ue = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Struct) {
this.te = new TimedOutException();
this.te.Read(iprot);
this.__isset.te = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
示例6: Read
public void Read(TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 0:
if (field.Type == TType.Map) {
{
this.success = new Dictionary<byte[], int>();
TMap _map59 = iprot.ReadMapBegin();
for( int _i60 = 0; _i60 < _map59.Count; ++_i60)
{
byte[] _key61;
int _val62;
_key61 = iprot.ReadBinary();
_val62 = iprot.ReadI32();
this.success[_key61] = _val62;
}
iprot.ReadMapEnd();
}
this.__isset.success = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 1:
if (field.Type == TType.Struct) {
this.ire = new InvalidRequestException();
this.ire.Read(iprot);
this.__isset.ire = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Struct) {
this.ue = new UnavailableException();
this.ue.Read(iprot);
this.__isset.ue = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Struct) {
this.te = new TimedOutException();
this.te.Read(iprot);
this.__isset.te = true;
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}