Examples of HiveSemaphoreImpl


Examples of org.hivedb.meta.HiveSemaphoreImpl

    HiveSemaphore hs;
    if (doesHiveSemaphoreExist())
      hs = get();
    else {
      JdbcTemplate j = getJdbcTemplate();
      hs = new HiveSemaphoreImpl(Status.writable, 1);
      Object[] parameters = new Object[]{hs.getStatus().getValue(), hs.getRevision()};
      try {
        j.update("INSERT INTO semaphore_metadata (status,revision) VALUES (?,?)", parameters);
      } catch (BadSqlGrammarException e) {
        throw new HiveSemaphoreNotFound(e.getMessage());
View Full Code Here

Examples of org.hivedb.meta.HiveSemaphoreImpl

    return exists;
  }

  protected class HiveSemaphoreRowMapper implements RowMapper {
    public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {
      return new HiveSemaphoreImpl(Status.getByValue(rs.getInt("status")), rs.getInt("revision"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.