use of org.apache.hyracks.api.resources.IDeallocatable in project asterixdb by apache.
the class WorkspaceFileFactory method createManagedWorkspaceFile.
@Override
public FileReference createManagedWorkspaceFile(String prefix) throws HyracksDataException {
final FileReference fRef = ioManager.createWorkspaceFile(prefix);
registry.registerDeallocatable(new IDeallocatable() {
@Override
public void deallocate() {
// Delete the created managed file.
FileUtils.deleteQuietly(fRef.getFile());
}
});
return fRef;
}
Aggregations