/
multimap_config.go
38 lines (34 loc) · 1.17 KB
/
multimap_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package types
import (
n "github.com/hazelcast/hazelcast-platform-operator/internal/naming"
)
type MultiMapConfigs struct {
MultiMaps []MultiMapConfig `xml:"multimap"`
}
type MultiMapConfig struct {
Name string `xml:"name,attr"`
CollectionType string `xml:"value-collection-type"`
BackupCount int32 `xml:"backup-count"`
AsyncBackupCount int32 `xml:"async-backup-count"`
Binary bool `xml:"binary"`
MergePolicy string
MergeBatchSize int32
StatisticsEnabled bool
// nullable
ListenerConfigs []ListenerConfigHolder
// nullable
SplitBrainProtectionName string
}
// Default values are explicitly written for all fields that are not nullable
// even though most are the same with the default values in Go.
func DefaultMultiMapConfigInput() *MultiMapConfig {
return &MultiMapConfig{
CollectionType: n.DefaultClusterName,
BackupCount: n.DefaultMapBackupCount,
AsyncBackupCount: n.DefaultMultiMapAsyncBackupCount,
Binary: n.DefaultMultiMapBinary,
MergePolicy: n.DefaultMultiMapMergePolicy,
MergeBatchSize: n.DefaultMultiMapMergeBatchSize,
StatisticsEnabled: n.DefaultMultiMapStatisticsEnabled,
}
}