Ejemplo n.º 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();
 }
Ejemplo n.º 2
0
 public void clearCaches() {
   serializationLock.lock();
   try {
     if (caching) {
       lockCache.clear();
     }
   } finally {
     serializationLock.unlock();
   }
 }
Ejemplo n.º 3
0
  /**
   * 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;
    }
  }
Ejemplo n.º 4
0
 /** Clear the cache */
 public void clear() {
   if (maxCacheSize < 1) {
     return;
   }
   readAccessCache.clear();
 }