private void handleTableAbsenceError(String table,KeyValuePersistenceSettings settings){
  int hndNum=tblAbsenceHandlersCnt.incrementAndGet();
  String tableFullName=settings.getKeyspace() + "." + table;
  try {
synchronized (tblAbsenceHandlersCnt) {
      if (hndNum != 0) {
        log.warning("Table " + tableFullName + " absence problem detected. "+ "Another thread already fixed it.");
        return;
      }
      log.warning("Table " + tableFullName + " absence problem detected. "+ "Trying to create table.");
      IgniteException error=new IgniteException("Failed to create Cassandra table " + tableFullName);
      int attempt=0;
      while (error != null && attempt < CQL_EXECUTION_ATTEMPTS_COUNT) {
        error=null;
        try {
          createKeyspace(settings);
          createTable(table,settings);
          createTableIndexes(table,settings);
        }
 catch (        Throwable e) {
          if (CassandraHelper.isHostsAvailabilityError(e))           handleHostsAvailabilityError(e,attempt,null);
 else           throw new IgniteException("Failed to create Cassandra table " + tableFullName,e);
          error=(e instanceof IgniteException) ? (IgniteException)e : new IgniteException(e);
        }
        attempt++;
      }
      if (error != null)       throw error;
    }
  }
  finally {
    if (hndNum == 0)     tblAbsenceHandlersCnt.set(-1);
  }
}

private void handleTableAbsenceError ( String table , KeyValuePersistenceSettings settings ) { int hndNum = tblAbsenceHandlersCnt . incrementAndGet ( ) ; String tableFullName = settings . getKeyspace ( ) + "." + table ; try { synchronized ( tblAbsenceHandlersCnt ) { if ( hndNum != 0 ) { log . warning ( "Table " + tableFullName + " absence problem detected. " + "Another thread already fixed it." ) ; return ; } log . warning ( "Table " + tableFullName + " absence problem detected. " + "Trying to create table." ) ; IgniteException error = new IgniteException ( "Failed to create Cassandra table " + tableFullName ) ; int attempt = 0 ; while ( error != null && attempt < CQL_EXECUTION_ATTEMPTS_COUNT ) { error = null ; try { createKeyspace ( settings ) ; createTable ( table , settings ) ; createTableIndexes ( table , settings ) ; } catch ( Throwable e ) { if ( CassandraHelper . isHostsAvailabilityError ( e ) ) handleHostsAvailabilityError ( e , attempt , null ) ; else throw new IgniteException ( "Failed to create Cassandra table " + tableFullName , e ) ; error = ( e instanceof IgniteException ) ? ( IgniteException ) e : new IgniteException ( e ) ; } attempt ++ ; } if ( error != null ) throw error ; } } finally { if ( hndNum == 0 ) tblAbsenceHandlersCnt . set ( - 1 ) ; } }
handles situation when cassandra table doesn ' t exist .
