Skip to content

Commit

Permalink
Replace MemorySize with Capacity (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPGreen authored Sep 20, 2023
1 parent ad2e4b6 commit 3f1ac52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/modules/ROOT/examples/storage/SampleHDConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import com.hazelcast.config.NativeMemoryConfig;
import com.hazelcast.memory.MemorySize;
import com.hazelcast.memory.Capacity;
import com.hazelcast.memory.MemoryUnit;

public class SampleHDConfiguration {

public static void main(String[] args) throws Exception{
//tag::hdconf[]
MemorySize memorySize = new MemorySize(512, MemoryUnit.MEGABYTES);
Capacity capacity = new Capacity(512, MemoryUnit.MEGABYTES);
NativeMemoryConfig nativeMemoryConfig =
new NativeMemoryConfig()
.setAllocatorType(NativeMemoryConfig.MemoryAllocatorType.POOLED)
.setSize(memorySize)
.setCapacity(capacity)
.setEnabled(true)
.setMinBlockSize(16)
.setPageSize(1 << 20);
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/storage/pages/high-density-memory.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ hazelcast:
Config config = new Config();
NativeMemoryConfig memoryConfig = new NativeMemoryConfig()
.setEnabled(true)
.setSize(new MemorySize(100, MemoryUnit.GIGABYTES))
.setCapacity(new Capacity(100, MemoryUnit.GIGABYTES))
.setAllocatorType(POOLED);
PersistentMemoryConfig pmemConfig = memoryConfig.getPersistentMemoryConfig()
.setEnabled(true)
Expand Down

0 comments on commit 3f1ac52

Please sign in to comment.