use of org.apache.ignite.internal.processors.igfs.IgfsEntryInfo 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.IgfsEntryInfo 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.IgfsEntryInfo 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;
}
use of org.apache.ignite.internal.processors.igfs.IgfsEntryInfo in project ignite by apache.
the class IgfsMetaUpdatePropertiesProcessor method process.
/** {@inheritDoc} */
@Override
public IgfsEntryInfo process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
Map<String, String> tmp = oldInfo.properties();
tmp = tmp == null ? new GridLeanMap<String, String>(props.size()) : new GridLeanMap<>(tmp);
for (Map.Entry<String, String> e : props.entrySet()) {
if (e.getValue() == null)
// Remove properties with 'null' values.
tmp.remove(e.getKey());
else
// Add/overwrite property.
tmp.put(e.getKey(), e.getValue());
}
IgfsEntryInfo newInfo = oldInfo.properties(tmp);
entry.setValue(newInfo);
return newInfo;
}
use of org.apache.ignite.internal.processors.igfs.IgfsEntryInfo in project ignite by apache.
the class IgfsMetaUpdateTimesProcessor method process.
/** {@inheritDoc} */
@Override
public Void process(MutableEntry<IgniteUuid, IgfsEntryInfo> entry, Object... args) throws EntryProcessorException {
IgfsEntryInfo oldInfo = entry.getValue();
entry.setValue(oldInfo.accessModificationTime(accessTime, modificationTime));
return null;
}
Aggregations