Skip to content

Commit

Permalink
feat: GH-260 support writeSortedMaps property
Browse files Browse the repository at this point in the history
closes #260
  • Loading branch information
abohutskyi committed Oct 8, 2024
1 parent a38af1f commit 7bd07d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ private AerospikeDataSettings configureDataSettings(AerospikeDataSettings dataSe
AerospikeDataProperties aerospikeDataProperties) {
dataSettings.setScansEnabled(aerospikeDataProperties.isScansEnabled());
dataSettings.setCreateIndexesOnStartup(aerospikeDataProperties.isCreateIndexesOnStartup());
dataSettings.setWriteSortedMaps(aerospikeDataProperties.isWriteSortedMaps());
return dataSettings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private AerospikeDataSettings configureDataSettings(AerospikeDataSettings dataSe
AerospikeDataProperties aerospikeDataProperties) {
dataSettings.setScansEnabled(aerospikeDataProperties.isScansEnabled());
dataSettings.setCreateIndexesOnStartup(aerospikeDataProperties.isCreateIndexesOnStartup());
dataSettings.setWriteSortedMaps(aerospikeDataProperties.isWriteSortedMaps());
return dataSettings;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,11 @@ public class AerospikeDataProperties {
* true - preserve original type if supported
*/
private boolean keepOriginalKeyTypes = false;

/**
* Define how Maps and POJOs are written: true - as sorted maps (TreeMaps, default), false - as unsorted (HashMaps)
* Writing unsorted maps (false) degrades performance of Map-related operations and does not allow comparing Maps,
* strongly recommended not to use except during upgrade from older versions of Spring Data Aerospike (if required)
*/
private boolean writeSortedMaps = true;
}

0 comments on commit 7bd07d8

Please sign in to comment.