use of org.apache.ignite.internal.processors.igfs.IgfsFileMap in project ignite by apache.
the class IgfsMetaFileUnlockProcessor method process.
/** {@inheritDoc} */
@Override
public Void process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
assert oldInfo != null;
IgfsEntryInfo newInfo = oldInfo.unlock(modificationTime);
if (updateSpace) {
IgfsFileMap newMap = new IgfsFileMap(newInfo.fileMap());
newMap.addRange(affRange);
newInfo = newInfo.length(newInfo.length() + space).fileMap(newMap);
}
entry.setValue(newInfo);
return null;
}
use of org.apache.ignite.internal.processors.igfs.IgfsFileMap in project ignite by apache.
the class IgfsMetaFileRangeDeleteProcessor method process.
/** {@inheritDoc} */
@Override
public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
IgfsFileMap newMap = new IgfsFileMap(oldInfo.fileMap());
newMap.deleteRange(range);
IgfsEntryInfo newInfo = oldInfo.fileMap(newMap);
entry.setValue(newInfo);
return newInfo;
}
use of org.apache.ignite.internal.processors.igfs.IgfsFileMap in project ignite by apache.
the class IgfsMetaFileRangeUpdateProcessor method process.
/** {@inheritDoc} */
@Override
public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
IgfsFileMap newMap = new IgfsFileMap(oldInfo.fileMap());
newMap.updateRangeStatus(range, status);
IgfsEntryInfo newInfo = oldInfo.fileMap(newMap);
entry.setValue(newInfo);
return newInfo;
}
use of org.apache.ignite.internal.processors.igfs.IgfsFileMap in project ignite by apache.
the class IgfsMetaFileReserveSpaceProcessor method process.
/** {@inheritDoc} */
@Override
public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
IgfsFileMap newMap = new IgfsFileMap(oldInfo.fileMap());
newMap.addRange(affRange);
IgfsEntryInfo newInfo = oldInfo.length(oldInfo.length() + space).fileMap(newMap);
entry.setValue(newInfo);
return newInfo;
}
Aggregations