BoundStatement select = statements.getLoadFile().bind(id);
session.executeAsync(select, new FutureCallback<ResultSet>() {
@Override
public void onSuccess(ResultSet result) {
Row row = result.one();
if (row == null) {
context.stop();
callback.onSuccess(null);
return;
}
try {
DefaultFileInfo fileInfo = new DefaultFileInfo()
.setId(id)
.setFileName(row.getString("filename"))
.setContentType(row.getString("contentType"))
.setLength(row.getLong("length"))
.setChunkSize(row.getInt("chunkSize"))
.setUploadDate(row.getLong("uploadDate"))
.setMetadata(row.getMap("metadata", String.class, String.class));
context.stop();
callback.onSuccess(fileInfo);
} catch (Throwable t) {