Exemple #1
0
 /** @throws Exception On test failure. */
 @AfterClass(groups = {"cache"})
 public void clear() throws Exception {
   fillCache();
   AssertJUnit.assertEquals(5, cache.size());
   cache.clear();
   AssertJUnit.assertEquals(0, cache.size());
   cache.close();
 }
 public void clearCaches() {
   serializationLock.lock();
   try {
     if (caching) {
       lockCache.clear();
     }
   } finally {
     serializationLock.unlock();
   }
 }
  /**
   * Removes all values from the ValueStore.
   *
   * @exception IOException If an I/O error occurred.
   */
  public void clear() throws IOException {
    try {
      Lock writeLock = lockManager.getWriteLock();
      try {
        dataStore.clear();

        valueCache.clear();
        valueIDCache.clear();
        namespaceCache.clear();
        namespaceIDCache.clear();

        initBNodeParams();

        setNewRevision();
      } finally {
        writeLock.release();
      }
    } catch (InterruptedException e) {
      IOException ioe = new IOException("Failed to acquire write lock");
      ioe.initCause(e);
      throw ioe;
    }
  }
 /** Clear the cache */
 public void clear() {
   if (maxCacheSize < 1) {
     return;
   }
   readAccessCache.clear();
 }