void removeCacheDirective(long id, boolean logRetryCache) throws IOException { final String operationName = "removeCacheDirective"; boolean success = false; String idStr = "{id: " + Long.toString(id) + "}"; checkOperation(OperationCategory.WRITE); writeLock(); try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot remove cache directives"); FSNDNCacheOp.removeCacheDirective(this, cacheManager, id, logRetryCache); success = true; } catch (AccessControlException ace) { logAuditEvent(success, operationName, idStr, null, null); throw ace; } finally { writeUnlock(operationName); } logAuditEvent(success, operationName, idStr, null, null); getEditLog().logSync(); }
void removeCacheDirective(long id, boolean logRetryCache) throws IOException { final String operationName = "removeCacheDirective"; boolean success = false; writeLock(); try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot remove cache directives", safeMode); } FSNDNCacheOp.removeCacheDirective(this, cacheManager, id, logRetryCache); success = true; } finally { writeUnlock(operationName); String idStr = "{id: " + Long.toString(id) + "}"; logAuditEvent(success, operationName, idStr, null, null); } getEditLog().logSync(); }
void removeCacheDirective(long id, boolean logRetryCache) throws IOException { final String operationName = "removeCacheDirective"; boolean success = false; writeLock(); try { checkOperation(OperationCategory.WRITE); if (isInSafeMode()) { throw new SafeModeException( "Cannot remove cache directives", safeMode); } FSNDNCacheOp.removeCacheDirective(this, cacheManager, id, logRetryCache); success = true; } finally { writeUnlock(operationName); String idStr = "{id: " + Long.toString(id) + "}"; logAuditEvent(success, operationName, idStr, null, null); } getEditLog().logSync(); }