/** {@inheritDoc} */ @Override public void setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException { if (enterBusy()) { try { A.notNull(path, "path"); if (accessTime == -1 && modificationTime == -1) return; FileDescriptor desc = getFileDescriptor(path); if (desc == null) { checkConflictWithPrimary(path); throw new GridGgfsFileNotFoundException("Failed to update times (path not found): " + path); } // Cannot update times for root. if (desc.parentId == null) return; meta.updateTimes(desc.parentId, desc.fileId, desc.fileName, accessTime, modificationTime); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set file times because Grid is stopping."); }
/** {@inheritDoc} */ @Override public void setTimes(GridGgfsPath path, long accessTime, long modificationTime) throws GridException { if (busyLock.enterBusy()) { try { A.notNull(path, "path"); if (accessTime == -1 && modificationTime == -1) return; FileDescriptor desc = getFileDescriptor(path); if (desc == null) { checkConflictWithPrimary(path); throw new GridGgfsFileNotFoundException("Failed to update times (path not found): " + path); } // Cannot update times for root. if (desc.parentId == null) return; meta.updateTimes(desc.parentId, desc.fileId, desc.fileName, accessTime, modificationTime); } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set file times because Grid is stopping."); }
FileDescriptor desc = getFileDescriptor(path);
FileDescriptor desc = getFileDescriptor(path);
FileDescriptor srcDesc = getFileDescriptor(src); FileDescriptor destDesc = getFileDescriptor(dest); destDesc = getFileDescriptor(destParent);
FileDescriptor srcDesc = getFileDescriptor(src); FileDescriptor destDesc = getFileDescriptor(dest); destDesc = getFileDescriptor(destParent);