So that people (like me!) can extend DiskPageStore and implement our directory / file hierarchy of choice, it would be nice if getSessionFolder were protected rather than private. To make sure people don't make silly mistakes it might be necessary to break this up into two methods (since this method determines the pathname AND creates it if it doesn't exist) and make the filename determination part the protected one.
My use case is that I'd like to be able to introduce a directory hierarchy for reasons of performance and filesystem limitations so every pagestore directory isn't rooted off the same single directory. I'd probably add some code like this:
long hashCode = sessionId.hashCode() & 0xffffff00;
String hexHashCode = String.format("%08x", hashCode);
String path = hexHashCode.substring(0, 3) + File.pathSeparator
+ hexHashCode.substring(3, 6) + File.pathSeparator + sessionId.replaceAll("
File sessionFolder = new File(storeFolder, path);
|Field||Original Value||New Value|
|Fix Version/s||1.4-M4 [ 12313295 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Assignee||Igor Vaynberg [ ivaynberg ]|
|Resolution||Fixed [ 1 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|1d 1m||1||Igor Vaynberg||28/Jul/08 17:24|