boolean useExpiration = false;
// looking over all eviction configurations till the end or till some expiration algorithm subclass not found.
for (EvictionRegionConfig evictionRegionConfig : evictionConfigurations)
{
EvictionAlgorithmConfig config = evictionRegionConfig.getEvictionAlgorithmConfig();
if (config instanceof ExpirationAlgorithmConfig)
{
// force set expiration key to default value in all Expiration configurations (if any)
((ExpirationAlgorithmConfig)evictionRegionConfig.getEvictionAlgorithmConfig())
.setExpirationKeyName(ExpirationAlgorithmConfig.EXPIRATION_KEY);