Package com.google.protobuf

Examples of com.google.protobuf.ServiceException


          }
        } while (scannerId != -1);
      } catch (ServiceException e) {
        throw e;
      } catch (Exception e) {
        throw new ServiceException(e);
      }
      return new Pair<List<ClientProtos.QueryResultProto>, List<ClientProtos.StringDataTypePair>>(
          queryResultProtos, nameDataTypePairs);
    }
View Full Code Here


          nameDataTypePairs.addAll(response.getMetaList());
        }
      } catch (ServiceException e) {
        throw e;
      } catch (Exception e) {
        throw new ServiceException(e);
      }
      return new Pair<List<ClientProtos.QueryResultProto>, List<ClientProtos.StringDataTypePair>>(
          queryResultProtos, nameDataTypePairs);
    }
View Full Code Here

        throw e;
      } catch (Exception e) {
        if (e instanceof IOException) {
          connection.clearCaches(serverName.getHostAndPort());
        }
        throw new ServiceException(e);
      }
    } else if (actions.size() > 1) {
      Map<EntityGroupInfo, List<Action>> actionMap = getActionMap(plan
          .getActions());
      boolean ret = twoPhaseCommit.submit(actionMap);
View Full Code Here

        throw e;
      } catch (Exception e) {
        if (e instanceof IOException) {
          connection.clearCaches(serverName.getHostAndPort());
        }
        throw new ServiceException(e);
      }
    } else if (actions.size() > 1) {
      Map<EntityGroupInfo, List<Action>> actionMap = getActionMap(plan
          .getActions());
      boolean ret = twoPhaseCommit.submit(actionMap);
View Full Code Here

        throw e;
      } catch (Exception e) {
        if (e instanceof IOException) {
          connection.clearCaches(serverName.getHostAndPort());
        }
        throw new ServiceException(e);
      }
    } else {
      // TODO
    }
View Full Code Here

          }
        } while (scannerId != -1);
      } catch (ServiceException e) {
        throw e;
      } catch (Exception e) {
        throw new ServiceException(e);
      }
      return new Pair<List<ClientProtos.QueryResultProto>, List<ClientProtos.StringDataTypePair>>(
          queryResultProtos, nameDataTypePairs);
    }
View Full Code Here

            resultDataType = info.getField().getType();
            break;
          }
        }
      } catch (Throwable throwable) {
        throw new ServiceException(throwable);
      }

      ClientProtos.QueryResultProto.Builder builder = ClientProtos.QueryResultProto.newBuilder();
            builder.addResult(ProtobufUtil.toStringBytesPair(new KeyValue(Bytes.toBytes(type.getMethodName()),
                Bytes.toBytes(info.getField().getFamily()), Bytes.toBytes(type.getMethodName()), value)));
View Full Code Here

            return id;
        }

        public void checkForFailure() throws ServiceException {
            if (isDead) {
                throw new ServiceException("Simulated server shutdown");
            }
        }
View Full Code Here

    try {
      List<String> argList = request.getArgsList();
      String[] args = argList.toArray(new String[argList.size()]);

      if (!request.hasIdentifier()) {
        throw new ServiceException("Request must contain identifier");
      }

      Collection<RefreshResponse> results = impl.refresh(request.getIdentifier(), args);

      return pack(results);
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

        Throwable ex = ute.getUndeclaredThrowable();
        if (ex instanceof PrivilegedActionException) {
          ex = ((PrivilegedActionException) ex).getException();
        }
        if (ex instanceof ServiceException) {
          ServiceException se = (ServiceException)ex;
          if (se.getCause() != null && se.getCause() instanceof AccessDeniedException) {
            // expected result
            return;
          }
        }
        fail("Not receiving AccessDeniedException for user '" + user.getShortName() + "'");
View Full Code Here

TOP

Related Classes of com.google.protobuf.ServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.