useFastReplay = context.getBoolean(
FileChannelConfiguration.USE_FAST_REPLAY,
FileChannelConfiguration.DEFAULT_USE_FAST_REPLAY);
Context encryptionContext = new Context(
context.getSubProperties(EncryptionConfiguration.ENCRYPTION_PREFIX +
"."));
String encryptionKeyProviderName = encryptionContext.getString(
EncryptionConfiguration.KEY_PROVIDER);
encryptionActiveKey = encryptionContext.getString(
EncryptionConfiguration.ACTIVE_KEY);
encryptionCipherProvider = encryptionContext.getString(
EncryptionConfiguration.CIPHER_PROVIDER);
if(encryptionKeyProviderName != null) {
Preconditions.checkState(!Strings.isNullOrEmpty(encryptionActiveKey),
"Encryption configuration problem: " +
EncryptionConfiguration.ACTIVE_KEY + " is missing");
Preconditions.checkState(!Strings.isNullOrEmpty(encryptionCipherProvider),
"Encryption configuration problem: " +
EncryptionConfiguration.CIPHER_PROVIDER + " is missing");
Context keyProviderContext = new Context(encryptionContext.
getSubProperties(EncryptionConfiguration.KEY_PROVIDER + "."));
encryptionKeyProvider = KeyProviderFactory.
getInstance(encryptionKeyProviderName, keyProviderContext);
} else {
Preconditions.checkState(encryptionActiveKey == null,