Package com.yahoo.config.subscription
Class ConfigHandle<T extends com.yahoo.config.ConfigInstance>
- java.lang.Object
-
- com.yahoo.config.subscription.ConfigHandle<T>
-
- Type Parameters:
T
- the type of the config
public class ConfigHandle<T extends com.yahoo.config.ConfigInstance> extends java.lang.Object
A config handle represents one config in the context of one active subscription on aConfigSubscriber
. It will contain meta data of the subscription of that particular config, as well as access to theConfigInstance
itself.- Author:
- vegardh
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConfigHandle(com.yahoo.config.subscription.impl.ConfigSubscription<T> sub)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getConfig()
The config of this handleboolean
isChanged()
Returns true if: The config generation for theConfigSubscriber
that produced this is the first one in its life cycle.java.lang.String
toString()
-
-
-
Constructor Detail
-
ConfigHandle
protected ConfigHandle(com.yahoo.config.subscription.impl.ConfigSubscription<T> sub)
-
-
Method Detail
-
isChanged
public boolean isChanged()
Returns true if: The config generation for theConfigSubscriber
that produced this is the first one in its life cycle. (Typically first time config.) or All configs for the subscriber have a new generation since the last time nextConfig() was called AND it's the same generation AND there is a change in this handle's config. (Typically calls for a reconfig.)- Returns:
- there is a new config
-
getConfig
public T getConfig()
The config of this handle- Returns:
- the config that this handle holds
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-