-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
type: enhancementA general enhancementA general enhancement
Description
Rainer Schamm opened DATAMONGO-1615 and commented
It would be great if we could extend the GridFsOperations interface to include the chunkSize at various levels.
Increasing the chunkSize can greatly improve performance for certain data scenarios...
E.g.
...
GridFSFile store(InputStream content, String filename, String contentType, DBObject metadata, Long chunkSize);
...
and
...
GridFSFile store(InputStream content, DBObject metadata, Long chunkSize);
...
The implementation would be straight forward:
...
public GridFSFile store(InputStream content, String filename, String contentType, DBObject metadata, Long chunkSize) {
Assert.notNull(content);
GridFSInputFile file = getGridFs().createFile(content);
if (filename != null) {
file.setFilename(filename);
}
if (metadata != null) {
file.setMetaData(metadata);
}
if (contentType != null) {
file.setContentType(contentType);
}
if (chunkSize != null) {
file.setChunkSize(chunkSize);
}
file.save();
return file;
}
...
No workaround seems to be available as far as I can see.
Affects: 1.10 GA (Ingalls)
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement