@@ -12,6 +12,8 @@ module DataSystem
1212 # FDv1 wires the existing v1 data source and store behavior behind the
1313 # generic DataSystem surface.
1414 #
15+ # @see DataSystem
16+ #
1517 class FDv1
1618 include LaunchDarkly ::Impl ::DataSystem
1719
@@ -68,85 +70,48 @@ def initialize(sdk_key, config)
6870 @diagnostic_accumulator = nil
6971 end
7072
71- #
72- # Starts the v1 update processor and returns immediately. The returned event
73- # will be set by the processor upon first successful initialization or upon permanent failure.
74- #
75- # If called multiple times, returns the same event as the first call. The update
76- # processor is created only once, and subsequent calls delegate to the processor's
77- # own start method which handles multiple invocations.
78- #
79- # @return [Concurrent::Event] Event that will be set when initialization is complete
80- #
73+ # (see DataSystem#start)
8174 def start
8275 @update_processor ||= make_update_processor
8376 @update_processor . start
8477 end
8578
86- #
87- # Halts the data system, stopping the update processor and shutting down the executor,
88- # making the data system no longer usable.
89- #
90- # @return [void]
91- #
79+ # (see DataSystem#stop)
9280 def stop
9381 @update_processor &.stop
9482 @shared_executor . shutdown
9583 end
9684
97- #
98- # Returns the feature store wrapper used by this data system.
99- #
100- # @return [LaunchDarkly::Impl::DataStore::ClientWrapper]
101- #
85+ # (see DataSystem#store)
10286 def store
10387 @store_wrapper
10488 end
10589
106- #
107- # Sets the diagnostic accumulator for streaming initialization metrics.
108- # This should be called before start() to ensure metrics are collected.
109- #
110- # @param diagnostic_accumulator [DiagnosticAccumulator] The diagnostic accumulator
111- # @return [void]
112- #
90+ # (see DataSystem#set_diagnostic_accumulator)
11391 def set_diagnostic_accumulator ( diagnostic_accumulator )
11492 @diagnostic_accumulator = diagnostic_accumulator
11593 end
11694
117- #
118- # Returns the data source status provider.
119- #
120- # @return [LaunchDarkly::Interfaces::DataSource::StatusProvider]
121- #
95+ # (see DataSystem#data_source_status_provider)
12296 def data_source_status_provider
12397 @data_source_status_provider
12498 end
12599
126- #
127- # Returns the data store status provider.
128- #
129- # @return [LaunchDarkly::Interfaces::DataStore::StatusProvider]
130- #
100+ # (see DataSystem#data_store_status_provider)
131101 def data_store_status_provider
132102 @data_store_status_provider
133103 end
134104
135- #
136- # Returns the broadcaster for flag change notifications.
137- #
138- # @return [LaunchDarkly::Impl::Broadcaster]
139- #
105+ # (see DataSystem#flag_change_broadcaster)
140106 def flag_change_broadcaster
141107 @flag_change_broadcaster
142108 end
143109
144110 #
145- # Indicates what form of data is currently available.
146- #
147- # This is calculated dynamically based on current system state.
111+ # (see DataSystem#data_availability)
148112 #
149- # @return [Symbol] One of DataAvailability constants
113+ # In LDD mode, always returns CACHED for backwards compatibility,
114+ # even if the store is empty.
150115 #
151116 def data_availability
152117 return DataAvailability ::DEFAULTS if @config . offline?
@@ -163,11 +128,7 @@ def data_availability
163128 DataAvailability ::DEFAULTS
164129 end
165130
166- #
167- # Indicates the ideal form of data attainable given the current configuration.
168- #
169- # @return [Symbol] One of DataAvailability constants
170- #
131+ # (see DataSystem#target_availability)
171132 def target_availability
172133 return DataAvailability ::DEFAULTS if @config . offline?
173134 return DataAvailability ::CACHED if @config . use_ldd?
0 commit comments