Class FileConfigSubscription<T extends com.yahoo.config.ConfigInstance>
java.lang.Object
com.yahoo.config.subscription.impl.ConfigSubscription<T>
com.yahoo.config.subscription.impl.FileConfigSubscription<T>
public class FileConfigSubscription<T extends com.yahoo.config.ConfigInstance>
extends ConfigSubscription<T>
Subscription used when config id is file:...
- Author:
- Vegard Havdal
-
Nested Class Summary
Nested classes/interfaces inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
ConfigSubscription.ConfigState<T extends com.yahoo.config.ConfigInstance> -
Field Summary
Fields inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
configClass, key, log -
Method Summary
Modifier and TypeMethodDescriptionbooleannextConfig(long timeout) Polls this subscription for a change.booleansubscribe(long timeout) Will block until the nextConfigSubscription.nextConfig(long)is guaranteed to return an answer (or throw) immediately (i.e. not block)Methods inherited from class com.yahoo.config.subscription.impl.ConfigSubscription
checkReloaded, close, equals, get, getConfigClass, getConfigState, getDefContent, getException, getKey, isClosed, isConfigChangedAndReset, reload, setConfigIfChanged, setConfigIncGen, setException, toString
-
Method Details
-
nextConfig
public boolean nextConfig(long timeout) Description copied from class:ConfigSubscriptionPolls this subscription for a change. The method is guaranteed to use all of the given timeout before returning false. It will also take into account a user-set generation, that can be set byConfigSubscriber.reload(long).- Specified by:
nextConfigin classConfigSubscription<T extends com.yahoo.config.ConfigInstance>- Parameters:
timeout- in milliseconds- Returns:
- false if timed out, true if generation or config or
ConfigSubscription.exceptionchanged. If true, theConfigSubscription.configfield will be set also. has changed
-
subscribe
public boolean subscribe(long timeout) Description copied from class:ConfigSubscriptionWill block until the nextConfigSubscription.nextConfig(long)is guaranteed to return an answer (or throw) immediately (i.e. not block)- Specified by:
subscribein classConfigSubscription<T extends com.yahoo.config.ConfigInstance>- Parameters:
timeout- in milliseconds- Returns:
- false if timed out
-