public boolean expire(Table table) {
    if (expirationPeriod <= 0) {
      return false;
    }
    long current = System.currentTimeMillis();
    Long last = expirationStatus.putIfAbsent(table.location(), current);
    if (last != null && current - last >= expirationPeriod) {
      expirationStatus.put(table.location(), current);
      ExecutorService executorService = executorService();
      executorService.submit(() -> {
        logger.debug("Expiring Iceberg table [{}] metadata", table.location());
        table.expireSnapshots()
          .expireOlderThan(current)
          .commit();
        // TODO: Replace with table metadata expiration through Iceberg API
        //       when https://github.com/apache/incubator-iceberg/issues/181 is resolved
        //       table.expireTableMetadata().expireOlderThan(current).commit();
        expireTableMetadata(table);
      });
      return true;
    }
    return false;
  }
public boolean expire(Table table) {
    if (expirationPeriod <= 0) {
      return false;
    }
    long current = System.currentTimeMillis();
    Long last = expirationStatus.putIfAbsent(table.location(), current);
    if (last != null && current - last >= expirationPeriod) {
      expirationStatus.put(table.location(), current);
      ExecutorService executorService = executorService();
      executorService.submit(() -> {
        logger.debug("Expiring Iceberg table [{}] metadata", table.location());
        table.expireSnapshots()
          .expireOlderThan(current)
          .commit();
       
       
       
        expireTableMetadata(table);
      });
      return true;
    }
    return false;
  }
public boolean expire(table table) { if (expirationperiod <= 0) { return false; } long current = system.currenttimemillis(); long last = expirationstatus.putifabsent(table.location(), current); if (last != null && current - last >= expirationperiod) { expirationstatus.put(table.location(), current); executorservice executorservice = executorservice(); executorservice.submit(() -> { logger.debug("expiring iceberg table [{}] metadata", table.location()); table.expiresnapshots() .expireolderthan(current) .commit(); expiretablemetadata(table); }); return true; } return false; }