class MetaStoreRestApi {

  @GET
  @Path("/database/count")
  @SubmarineApi
  public Response getDatabaseCount() {
    int databaseCount = -1;
    try {
      databaseCount = submarineMetaStore.getDatabaseCount();
    } catch (MetaException e) {
      LOG.error(e.getMessage(), e);
      return new JsonResponse.Builder<Integer>(
              Response.Status.INTERNAL_SERVER_ERROR).success(false)
              .result(databaseCount).build();
    }
    return new JsonResponse.Builder<Integer>(Response.Status.OK)
            .success(true).result(databaseCount).build();
  }

  @Inject public  MetaStoreRestApi();

}