public byte[] load(String dirName, String name) throws IOException { byte[] buf = getFromLog(dirName, name); if (buf == null) { // Gets it from disk. buf = repository.load(dirName, name); } return buf; }
public byte[] load(String dirName, String name) throws IOException { byte[] buf = getFromLog(dirName, name); if (buf == null) { // Gets it from disk. buf = repository.load(dirName, name); } return buf; }
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; } }