org.apache.jackrabbit.core.data.DataStore.deleteAllOlderThan()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.apache.jackrabbit.core.data.DataStore.deleteAllOlderThan()方法的一些代码示例,展示了DataStore.deleteAllOlderThan()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataStore.deleteAllOlderThan()方法的具体详情如下:
包路径:org.apache.jackrabbit.core.data.DataStore
类名称:DataStore
方法名:deleteAllOlderThan

DataStore.deleteAllOlderThan介绍

[英]Delete objects that have a modified date older than the specified date.
[中]删除修改日期早于指定日期的对象。

代码示例

代码示例来源:origin: apache/jackrabbit

/**
 * Delete objects that have a modified date older than the specified date
 * from the archive data store.
 * 
 * @param min
 *            the minimum time
 * @return the number of data records deleted
 * @throws DataStoreException
 */
public int deleteAllOlderThan(long min) throws DataStoreException {
  return archiveDataStore.deleteAllOlderThan(min);
}

代码示例来源:origin: apache/jackrabbit-oak

@Override
public int deleteAllOlderThan(long min) throws DataStoreException {
  return delegate.deleteAllOlderThan(min);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

@Override
public int deleteAllOlderThan(long min) throws DataStoreException {
  return delegate.deleteAllOlderThan(min);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Delete objects that have a modified date older than the specified date
 * from the archive data store.
 * 
 * @param min
 *            the minimum time
 * @return the number of data records deleted
 * @throws DataStoreException
 */
public int deleteAllOlderThan(long min) throws DataStoreException {
  return archiveDataStore.deleteAllOlderThan(min);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-data

/**
 * Delete objects that have a modified date older than the specified date
 * from the archive data store.
 * 
 * @param min
 *            the minimum time
 * @return the number of data records deleted
 * @throws DataStoreException
 */
public int deleteAllOlderThan(long min) throws DataStoreException {
  return archiveDataStore.deleteAllOlderThan(min);
}

代码示例来源:origin: org.apache.jackrabbit/oak-blob-plugins

@Override
public int deleteAllOlderThan(long min) throws DataStoreException {
  return delegate.deleteAllOlderThan(min);
}

代码示例来源:origin: apache/jackrabbit

public int sweep() throws RepositoryException {
  if (startScanTimestamp == 0) {
    throw new RepositoryException("scan must be called first");
  }
  stopScan();
  return store.deleteAllOlderThan(startScanTimestamp);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core

public int sweep() throws RepositoryException {
  if (startScanTimestamp == 0) {
    throw new RepositoryException("scan must be called first");
  }
  stopScan();
  return store.deleteAllOlderThan(startScanTimestamp);
}

代码示例来源:origin: apache/jackrabbit-oak

@Override
public int deleteAllOlderThan(long min) throws DataStoreException {
  checkIfReadOnly();
  return getDelegate().deleteAllOlderThan(min);
}

代码示例来源:origin: org.apache.jackrabbit/oak-upgrade

@Override
public int deleteAllOlderThan(long min) throws DataStoreException {
  checkIfReadOnly();
  return getDelegate().deleteAllOlderThan(min);
}

代码示例来源:origin: apache/jackrabbit

public void run() {
    try {
      while (!gcLoopStop) {
        if (ids.size() > 0) {
          // store.clearInUse();
          long now = System.currentTimeMillis();
          LOG.debug("gc now: " + now);
          store.updateModifiedDateOnAccess(now);
          for (DataIdentifier id : new ArrayList<DataIdentifier>(ids)) {
            LOG.debug("   gc touch " + id);
            store.getRecord(id);
          }
          int count = store.deleteAllOlderThan(now);
          LOG.debug("gc now: " + now + " done, deleted: " + count);
        }
      }
    } catch (DataStoreException e) {
      gcException = e;
    }
  }
};

代码示例来源:origin: apache/jackrabbit-oak

ds.clearInUse();
Assert.assertEquals("only rec2 should be deleted", 1,
  ds.deleteAllOlderThan(updateTime));
assertNull("rec2 should be null",
  ds.getRecordIfStored(rec2.getIdentifier()));

代码示例来源:origin: apache/jackrabbit

ds.clearInUse();
assertEquals("only rec2 should be deleted", 1,
  ds.deleteAllOlderThan(updateTime));
assertNull("rec2 should be null",
  ds.getRecordIfStored(rec2.getIdentifier()));

相关文章