public final void delete(String dirName, String name) { Object key = OperationKey.newKey(dirName, name); Hashtable log = ((Context) perThreadContext.get()).getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); op = (Operation) log.put(key, op); if (op != null) op.free(); }
public final void delete(String dirName, String name) { Object key = OperationKey.newKey(dirName, name); Hashtable<Object, Operation> log = perThreadContext.get().getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); op = log.put(key, op); if (op != null) op.free(); }
public final void delete(String dirName, String name) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, delete(" + dirName + ", " + name + ")"); Object key = OperationKey.newKey(dirName, name); Hashtable log = ((Context) perThreadContext.get()).getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); Operation old = (Operation) log.put(key, op); if (old != null) { if (old.type == Operation.CREATE) op.type = Operation.NOOP; old.free(); } }
public final void delete(String dirName, String name) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, delete(" + dirName + ", " + name + ")"); Object key = OperationKey.newKey(dirName, name); Hashtable log = ((Context) perThreadContext.get()).getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); Operation old = (Operation) log.put(key, op); if (old != null) { if (old.type == Operation.CREATE) op.type = Operation.NOOP; old.free(); } }
public final void delete(String dirName, String name) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, delete(" + dirName + ", " + name + ")"); Object key = OperationKey.newKey(dirName, name); Hashtable<Object, Operation> log = perThreadContext.get().getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); Operation old = log.put(key, op); if (old != null) { if (old.type == Operation.CREATE) op.type = Operation.NOOP; old.free(); } }
public final void delete(String dirName, String name) { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "NTransaction, delete(" + dirName + ", " + name + ")"); Object key = OperationKey.newKey(dirName, name); Hashtable<Object, Operation> log = perThreadContext.get().getLog(); Operation op = Operation.alloc(Operation.DELETE, dirName, name); Operation old = log.put(key, op); if (old != null) { if (old.type == Operation.CREATE) op.type = Operation.NOOP; old.free(); } }
if (op != null) op.free();
op = (Operation) templog.put(key, op); if (op != null) op.free();
if (op != null) op.free();
protected final void saveInLog(byte[] buf, String dirName, String name, Hashtable log, boolean copy, boolean first) throws IOException { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "ATransaction, saveInLog(" + dirName + '/' + name + ", " + copy + ", " + first + ")"); Object key = OperationKey.newKey(dirName, name); Operation op = Operation.alloc(Operation.SAVE, dirName, name, buf); Operation old = (Operation) log.put(key, op); if (copy) { if ((old != null) && (old.type == Operation.SAVE) && (old.value.length == buf.length)) { // reuse old buffer op.value = old.value; } else { // alloc a new one op.value = new byte[buf.length]; } System.arraycopy(buf, 0, op.value, 0, buf.length); } if (old != null) old.free(); }
"ATransaction, can't delete " + file.getCanonicalPath()); op.free();
"ATransaction, can't delete " + file.getCanonicalPath()); op.free();
protected final void saveInLog(byte[] buf, String dirName, String name, Hashtable log, boolean copy, boolean first) throws IOException { if (logmon.isLoggable(BasicLevel.DEBUG)) logmon.log(BasicLevel.DEBUG, "ATransaction, saveInLog(" + dirName + '/' + name + ", " + copy + ", " + first + ")"); Object key = OperationKey.newKey(dirName, name); Operation op = Operation.alloc(Operation.SAVE, dirName, name, buf); Operation old = (Operation) log.put(key, op); if (copy) { if ((old != null) && (old.type == Operation.SAVE) && (old.value.length == buf.length)) { // reuse old buffer op.value = old.value; } else { // alloc a new one op.value = new byte[buf.length]; } System.arraycopy(buf, 0, op.value, 0, buf.length); } if (old != null) old.free(); }
op = (Operation) templog.put(key, op); if (op != null) op.free();
if (old != null) old.free();
if (old != null) old.free();
if (old != null) old.free();
if (old != null) old.free();