@@ -3096,112 +3096,148 @@ public static <K, V> RegionFactory<K, V> mockRegionFactory(Cache mockCache, Regi
3096
3096
new ExpirationAttributes (0 , ExpirationAction .INVALIDATE );
3097
3097
3098
3098
AtomicBoolean cloningEnabled = new AtomicBoolean (optionalRegionAttributes
3099
- .map (RegionAttributes ::getCloningEnabled ).orElse (false ));
3099
+ .map (RegionAttributes ::getCloningEnabled )
3100
+ .orElse (false ));
3100
3101
3101
3102
AtomicBoolean concurrencyChecksEnabled = new AtomicBoolean (optionalRegionAttributes
3102
- .map (RegionAttributes ::getConcurrencyChecksEnabled ).orElse (true ));
3103
+ .map (RegionAttributes ::getConcurrencyChecksEnabled )
3104
+ .orElse (true ));
3103
3105
3104
3106
AtomicBoolean diskSynchronous = new AtomicBoolean (optionalRegionAttributes
3105
- .map (RegionAttributes ::isDiskSynchronous ).orElse (true ));
3107
+ .map (RegionAttributes ::isDiskSynchronous )
3108
+ .orElse (true ));
3106
3109
3107
3110
AtomicBoolean enableAsyncConflation = new AtomicBoolean (optionalRegionAttributes
3108
- .map (RegionAttributes ::getEnableAsyncConflation ).orElse (false ));
3111
+ .map (RegionAttributes ::getEnableAsyncConflation )
3112
+ .orElse (false ));
3109
3113
3110
3114
AtomicBoolean enableSubscriptionConflation = new AtomicBoolean (optionalRegionAttributes
3111
- .map (RegionAttributes ::getEnableSubscriptionConflation ).orElse (false ));
3115
+ .map (RegionAttributes ::getEnableSubscriptionConflation )
3116
+ .orElse (false ));
3112
3117
3113
3118
AtomicBoolean ignoreJta = new AtomicBoolean (optionalRegionAttributes
3114
- .map (RegionAttributes ::getIgnoreJTA ).orElse (false ));
3119
+ .map (RegionAttributes ::getIgnoreJTA )
3120
+ .orElse (false ));
3115
3121
3116
3122
AtomicBoolean indexMaintenanceSynchronous = new AtomicBoolean (optionalRegionAttributes
3117
- .map (RegionAttributes ::getIndexMaintenanceSynchronous ).orElse (true ));
3123
+ .map (RegionAttributes ::getIndexMaintenanceSynchronous )
3124
+ .orElse (true ));
3118
3125
3119
3126
AtomicBoolean lockGrantor = new AtomicBoolean (optionalRegionAttributes
3120
- .map (RegionAttributes ::isLockGrantor ).orElse (false ));
3127
+ .map (RegionAttributes ::isLockGrantor )
3128
+ .orElse (false ));
3121
3129
3122
3130
AtomicBoolean multicastEnabled = new AtomicBoolean (optionalRegionAttributes
3123
- .map (RegionAttributes ::getMulticastEnabled ).orElse (false ));
3131
+ .map (RegionAttributes ::getMulticastEnabled )
3132
+ .orElse (false ));
3124
3133
3125
3134
AtomicBoolean offHeap = new AtomicBoolean (optionalRegionAttributes
3126
- .map (RegionAttributes ::getOffHeap ).orElse (false ));
3135
+ .map (RegionAttributes ::getOffHeap )
3136
+ .orElse (false ));
3127
3137
3128
3138
AtomicBoolean statisticsEnabled = new AtomicBoolean (optionalRegionAttributes
3129
- .map (RegionAttributes ::getStatisticsEnabled ).orElse (false ));
3139
+ .map (RegionAttributes ::getStatisticsEnabled )
3140
+ .orElse (false ));
3130
3141
3131
3142
AtomicInteger concurrencyLevel = new AtomicInteger (optionalRegionAttributes
3132
- .map (RegionAttributes ::getConcurrencyLevel ).orElse (16 ));
3143
+ .map (RegionAttributes ::getConcurrencyLevel )
3144
+ .orElse (16 ));
3133
3145
3134
3146
AtomicInteger initialCapacity = new AtomicInteger (optionalRegionAttributes
3135
- .map (RegionAttributes ::getInitialCapacity ).orElse (16 ));
3147
+ .map (RegionAttributes ::getInitialCapacity )
3148
+ .orElse (16 ));
3136
3149
3137
3150
AtomicReference <CacheLoader > cacheLoader = new AtomicReference <>(optionalRegionAttributes
3138
- .map (RegionAttributes ::getCacheLoader ).orElse (null ));
3151
+ .map (RegionAttributes ::getCacheLoader )
3152
+ .orElse (null ));
3139
3153
3140
3154
AtomicReference <CacheWriter > cacheWriter = new AtomicReference <>(optionalRegionAttributes
3141
- .map (RegionAttributes ::getCacheWriter ).orElse (null ));
3155
+ .map (RegionAttributes ::getCacheWriter )
3156
+ .orElse (null ));
3142
3157
3143
3158
AtomicReference <Compressor > compressor = new AtomicReference <>(optionalRegionAttributes
3144
- .map (RegionAttributes ::getCompressor ).orElse (null ));
3159
+ .map (RegionAttributes ::getCompressor )
3160
+ .orElse (null ));
3145
3161
3146
3162
AtomicReference <CustomExpiry <K , V >> customEntryIdleTimeout = new AtomicReference <>(optionalRegionAttributes
3147
- .map (RegionAttributes ::getCustomEntryIdleTimeout ).orElse (null ));
3163
+ .map (RegionAttributes ::getCustomEntryIdleTimeout )
3164
+ .orElse (null ));
3148
3165
3149
3166
AtomicReference <CustomExpiry <K , V >> customEntryTimeToLive = new AtomicReference <>(optionalRegionAttributes
3150
- .map (RegionAttributes ::getCustomEntryTimeToLive ).orElse (null ));
3167
+ .map (RegionAttributes ::getCustomEntryTimeToLive )
3168
+ .orElse (null ));
3151
3169
3152
3170
AtomicReference <DataPolicy > dataPolicy = new AtomicReference <>(optionalRegionAttributes
3153
- .map (RegionAttributes ::getDataPolicy ).orElseGet (() -> convert (regionShortcut )));
3171
+ .map (RegionAttributes ::getDataPolicy )
3172
+ .orElseGet (() -> convert (regionShortcut )));
3154
3173
3155
3174
AtomicReference <String > diskStoreName = new AtomicReference <>(optionalRegionAttributes
3156
- .map (RegionAttributes ::getDiskStoreName ).orElse (null ));
3175
+ .map (RegionAttributes ::getDiskStoreName )
3176
+ .orElse (null ));
3157
3177
3158
3178
AtomicReference <ExpirationAttributes > entryIdleTimeout = new AtomicReference <>(optionalRegionAttributes
3159
- .map (RegionAttributes ::getEntryIdleTimeout ).orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3179
+ .map (RegionAttributes ::getEntryIdleTimeout )
3180
+ .orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3160
3181
3161
3182
AtomicReference <ExpirationAttributes > entryTimeToLive = new AtomicReference <>(optionalRegionAttributes
3162
- .map (RegionAttributes ::getEntryTimeToLive ).orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3183
+ .map (RegionAttributes ::getEntryTimeToLive )
3184
+ .orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3163
3185
3164
3186
AtomicReference <EvictionAttributes > evictionAttributes = new AtomicReference <>(optionalRegionAttributes
3165
- .map (RegionAttributes ::getEvictionAttributes ).orElseGet (EvictionAttributes ::createLRUEntryAttributes ));
3187
+ .map (RegionAttributes ::getEvictionAttributes )
3188
+ .orElseGet (EvictionAttributes ::createLRUEntryAttributes ));
3166
3189
3167
3190
AtomicReference <Class <K >> keyConstraint = new AtomicReference <>(optionalRegionAttributes
3168
- .map (RegionAttributes ::getKeyConstraint ).orElse (null ));
3191
+ .map (RegionAttributes ::getKeyConstraint )
3192
+ .orElse (null ));
3169
3193
3170
3194
AtomicReference <Float > loadFactor = new AtomicReference <>(optionalRegionAttributes
3171
- .map (RegionAttributes ::getLoadFactor ).orElse (0.75f ));
3195
+ .map (RegionAttributes ::getLoadFactor )
3196
+ .orElse (0.75f ));
3172
3197
3173
3198
AtomicReference <MembershipAttributes > membershipAttributes = new AtomicReference <>(optionalRegionAttributes
3174
- .map (RegionAttributes ::getMembershipAttributes ).orElseGet (MembershipAttributes ::new ));
3199
+ .map (RegionAttributes ::getMembershipAttributes )
3200
+ .orElseGet (MembershipAttributes ::new ));
3175
3201
3176
3202
AtomicReference <PartitionAttributes <K , V >> partitionAttributes = new AtomicReference <>(optionalRegionAttributes
3177
- .map (RegionAttributes ::getPartitionAttributes ).orElse (null ));
3203
+ .map (RegionAttributes ::getPartitionAttributes )
3204
+ .orElse (null ));
3178
3205
3179
3206
AtomicReference <String > poolName = new AtomicReference <>(optionalRegionAttributes
3180
- .map (RegionAttributes ::getPoolName ).orElse (null ));
3207
+ .map (RegionAttributes ::getPoolName )
3208
+ .orElse (null ));
3181
3209
3182
3210
AtomicReference <ExpirationAttributes > regionIdleTimeout = new AtomicReference <>(optionalRegionAttributes
3183
- .map (RegionAttributes ::getRegionIdleTimeout ).orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3211
+ .map (RegionAttributes ::getRegionIdleTimeout )
3212
+ .orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3184
3213
3185
3214
AtomicReference <ExpirationAttributes > regionTimeToLive = new AtomicReference <>(optionalRegionAttributes
3186
- .map (RegionAttributes ::getRegionTimeToLive ).orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3215
+ .map (RegionAttributes ::getRegionTimeToLive )
3216
+ .orElse (DEFAULT_EXPIRATION_ATTRIBUTES ));
3187
3217
3188
3218
AtomicReference <Scope > scope = new AtomicReference <>(optionalRegionAttributes
3189
- .map (RegionAttributes ::getScope ).orElse (Scope .DISTRIBUTED_NO_ACK ));
3219
+ .map (RegionAttributes ::getScope )
3220
+ .orElse (Scope .DISTRIBUTED_NO_ACK ));
3190
3221
3191
3222
AtomicReference <SubscriptionAttributes > subscriptionAttributes = new AtomicReference <>(optionalRegionAttributes
3192
- .map (RegionAttributes ::getSubscriptionAttributes ).orElseGet (SubscriptionAttributes ::new ));
3223
+ .map (RegionAttributes ::getSubscriptionAttributes )
3224
+ .orElseGet (SubscriptionAttributes ::new ));
3193
3225
3194
3226
AtomicReference <Class <V >> valueConstraint = new AtomicReference <>(optionalRegionAttributes
3195
- .map (RegionAttributes ::getValueConstraint ).orElse (null ));
3227
+ .map (RegionAttributes ::getValueConstraint )
3228
+ .orElse (null ));
3196
3229
3197
3230
List <CacheListener > cacheListeners = new ArrayList <>(Arrays .asList (nullSafeArray (optionalRegionAttributes
3198
- .map (RegionAttributes ::getCacheListeners ).orElse (null ), CacheListener .class )));
3231
+ .map (RegionAttributes ::getCacheListeners )
3232
+ .orElse (null ), CacheListener .class )));
3199
3233
3200
3234
Set <String > asyncEventQueueIds = new HashSet <>(nullSafeSet (optionalRegionAttributes
3201
- .map (RegionAttributes ::getAsyncEventQueueIds ).orElse (null )));
3235
+ .map (RegionAttributes ::getAsyncEventQueueIds )
3236
+ .orElse (null )));
3202
3237
3203
3238
Set <String > gatewaySenderIds = new HashSet <>(nullSafeSet (optionalRegionAttributes
3204
- .map (RegionAttributes ::getGatewaySenderIds ).orElse (null )));
3239
+ .map (RegionAttributes ::getGatewaySenderIds )
3240
+ .orElse (null )));
3205
3241
3206
3242
when (mockRegionFactory .addAsyncEventQueueId (anyString ()))
3207
3243
.thenAnswer (newAdder (asyncEventQueueIds , mockRegionFactory ));
0 commit comments