public class DefaultConfigurationManager extends Object implements GenericDeltaReceiver, ConfigurationManager, ConfigurationProcessedObserver
Constructor and Description |
---|
DefaultConfigurationManager() |
Modifier and Type | Method and Description |
---|---|
CommonRecord |
getConfiguration()
Retrieves full configuration
|
void |
onConfigurationProcessed()
Notify about configuration processing is finished.
|
void |
onDeltaReceived(int index,
org.apache.avro.generic.GenericRecord data,
boolean fullResync)
Called on each deserialized delta
|
void |
subscribeForConfigurationUpdates(ConfigurationReceiver receiver)
Subscribes for configuration updates.
NOTE: Attempting to subscribe two instances of ConfigurationReceiver such as
receiver1.equals(receiver2) == true
will result the fact that only first instance will be subscribed. |
void |
unsubscribeFromConfigurationUpdates(ConfigurationReceiver receiver)
Unsubscribes from configuration updates.
NOTE: Attempting to unsubscribe object which was not subscribed previously will not make any effect. |
public void onDeltaReceived(int index, org.apache.avro.generic.GenericRecord data, boolean fullResync)
GenericDeltaReceiver
onDeltaReceived
in interface GenericDeltaReceiver
index
- Index of the current delta in the union listdata
- Avro generic object with deserialized deltafullResync
- Tells if current delta is a full resyncpublic void onConfigurationProcessed()
ConfigurationProcessedObserver
onConfigurationProcessed
in interface ConfigurationProcessedObserver
public void subscribeForConfigurationUpdates(ConfigurationReceiver receiver)
ConfigurationManager
ConfigurationReceiver
such as
receiver1.equals(receiver2) == true
will result the fact that only first instance will be subscribed.subscribeForConfigurationUpdates
in interface ConfigurationManager
receiver
- object to receive updatesConfigurationReceiver
public void unsubscribeFromConfigurationUpdates(ConfigurationReceiver receiver)
ConfigurationManager
unsubscribeFromConfigurationUpdates
in interface ConfigurationManager
receiver
- object which is no longer needs configuration updatesConfigurationReceiver
public CommonRecord getConfiguration()
ConfigurationManager
getConfiguration
in interface ConfigurationManager
CommonRecord
Copyright © 2014. All rights reserved.