File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
driver/src/main/java/oracle/nosql/driver/util Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,19 @@ public void stop(boolean wait) {
227227 }
228228 }
229229
230+ /**
231+ * Removes all the entries from this cache. The cache will be empty after
232+ * this call returns.
233+ */
234+ public void clear () {
235+ lock .lock ();
236+ try {
237+ cacheMap .clear ();
238+ } finally {
239+ lock .unlock ();
240+ }
241+ }
242+
230243 private boolean isExpired (CacheEntry <V > entry ) {
231244 final long now = System .currentTimeMillis ();
232245
@@ -292,7 +305,7 @@ private class TimeBasedCleanupTask implements Runnable {
292305
293306 /**
294307 * Attempt to stop the background activity for the cleanup.
295- * @param wait if true, the the method attempts to wait for the
308+ * @param wait if true, the method attempts to wait for the
296309 * background thread to finish background activity.
297310 */
298311 void stop (boolean wait ) {
You can’t perform that action at this time.
0 commit comments