MCPcopy Index your code
hub / github.com/apache/tomcat / remove

Method remove

java/org/apache/catalina/session/FileStore.java:240–260  ·  view source on GitHub ↗
(String id)

Source from the content-addressed store, hash-verified

238
239
240 @Override
241 public void remove(String id) throws IOException {
242 File file = file(id);
243 if (file == null) {
244 return;
245 }
246 if (manager.getContext().getLogger().isTraceEnabled()) {
247 manager.getContext().getLogger()
248 .trace(sm.getString(getStoreName() + ".removing", id, file.getAbsolutePath()));
249 }
250
251 Lock writeLock = sessionLocksById.getLock(id).writeLock();
252 writeLock.lock();
253 try {
254 if (file.exists() && !file.delete()) {
255 throw new IOException(sm.getString("fileStore.deleteSessionFailed", file));
256 }
257 } finally {
258 writeLock.unlock();
259 }
260 }
261
262
263 @Override

Callers 1

clearMethod · 0.95

Calls 14

fileMethod · 0.95
getStoreNameMethod · 0.95
writeLockMethod · 0.80
isTraceEnabledMethod · 0.65
getLoggerMethod · 0.65
getContextMethod · 0.65
traceMethod · 0.65
getStringMethod · 0.65
getLockMethod · 0.65
lockMethod · 0.65
existsMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected