private final byte[] getFromLog(String dirName, String name) throws IOException { // First searches in the logs a new value for the object. Object key = OperationKey.newKey(dirName, name); byte[] buf = getFromLog(perThreadContext.get().getLog(), key); if (buf != null) return buf; if ((buf = getFromLog(logFile.log, key)) != null) { return buf; } return null; }
private final byte[] getFromLog(String dirName, String name) throws IOException { // First searches in the logs a new value for the object. Object key = OperationKey.newKey(dirName, name); byte[] buf = getFromLog(((Context) perThreadContext.get()).getLog(), key); if (buf != null) return buf; if ((buf = getFromLog(logFile.log, key)) != null) { return buf; } return null; }
public byte[] loadByteArray(String dirName, String name) throws IOException { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, loadByteArray(" + dirName + '/' + name + ")"); // First searches in the logs a new value for the object. try { byte[] buf = getFromLog(dirName, name); if (buf != null) return buf; // Gets it from disk. return repository.load(dirName, name); } catch (FileNotFoundException exc) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, loadByteArray(" + dirName + '/' + name + ") not found"); return null; } }
public byte[] loadByteArray(String dirName, String name) throws IOException { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, loadByteArray(" + dirName + '/' + name + ")"); // First searches in the logs a new value for the object. try { byte[] buf = getFromLog(dirName, name); if (buf != null) return buf; // Gets it from disk. return repository.load(dirName, name); } catch (FileNotFoundException exc) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, loadByteArray(" + dirName + '/' + name + ") not found"); return null; } }