Interface ZoneRulesDataProvider
-
- All Known Implementing Classes:
ResourceZoneRulesDataProvider
public interface ZoneRulesDataProvider
Provides access to a versioned set of time-zone rules from a single group.Multiple providers of time-zone rules may be registered. Each provider will supply one to many zone IDs. No two providers may overlap in the set of zone IDs that they provide.
The values returned by the provider must never change over time. A new provider must be returned to return new regions or versions.
Many systems would like to receive new time-zone rules dynamically. This must be implemented separately from this interface, typically using a listener. Whenever the listener detects new rules it should call
ZoneRulesGroup.registerProvider(ZoneRulesDataProvider)
using a standard immutable provider implementation.ZoneRulesDataProvider is a service provider interface that can be called by multiple threads. Implementations must be immutable and thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getGroupID()
Gets the time-zone group ID of the data available via this provider, such as 'TZDB'.java.util.Set<java.lang.String>
getRegionIDs()
Gets the provided region IDs.java.util.Set<ZoneRulesVersion>
getVersions()
Gets the provided rules, version by version.
-
-
-
Method Detail
-
getGroupID
java.lang.String getGroupID()
Gets the time-zone group ID of the data available via this provider, such as 'TZDB'.Group IDs must match regex
[A-Za-z0-9._-]+
. Group IDs should use reverse domain name notation, like packages. Group IDs without a dot are reserved.- Returns:
- the ID of the group, never null
-
getVersions
java.util.Set<ZoneRulesVersion> getVersions()
Gets the provided rules, version by version.- Returns:
- the provided rules, not to be modified, never null
-
getRegionIDs
java.util.Set<java.lang.String> getRegionIDs()
Gets the provided region IDs.- Returns:
- the provided region IDs, not to be modified, never null
-
-