use of org.apache.ignite.internal.processors.igfs.client.IgfsClientSetTimesCallable in project ignite by apache.
the class IgfsImpl method setTimes.
/** {@inheritDoc} */
@Override
public void setTimes(final IgfsPath path, final long modificationTime, final long accessTime) {
A.notNull(path, "path");
if (accessTime == -1 && modificationTime == -1)
return;
if (meta.isClient()) {
meta.runClientTask(new IgfsClientSetTimesCallable(cfg.getName(), IgfsUserContext.currentUser(), path, accessTime, modificationTime));
return;
}
safeOp(new Callable<Void>() {
@Override
public Void call() throws Exception {
IgfsMode mode = resolveMode(path);
if (mode == PROXY)
secondaryFs.setTimes(path, modificationTime, accessTime);
else {
meta.updateTimes(path, modificationTime, accessTime, IgfsUtils.isDualMode(mode) ? secondaryFs : null);
}
return null;
}
});
}
Aggregations