1717package feast .serving .registry ;
1818
1919import feast .proto .core .*;
20+ import feast .proto .core .FeatureServiceProto .FeatureService ;
21+ import feast .proto .core .FeatureViewProto .FeatureView ;
22+ import feast .proto .core .OnDemandFeatureViewProto .OnDemandFeatureView ;
2023import feast .proto .serving .ServingAPIProto ;
2124import feast .serving .exception .SpecRetrievalException ;
2225import java .util .List ;
2629
2730public class Registry {
2831 private final RegistryProto .Registry registry ;
29- private Map <String , FeatureViewProto .FeatureViewSpec > featureViewNameToSpec ;
32+ private final Map <String , FeatureViewProto .FeatureViewSpec > featureViewNameToSpec ;
3033 private Map <String , OnDemandFeatureViewProto .OnDemandFeatureViewSpec >
3134 onDemandFeatureViewNameToSpec ;
32- private Map <String , FeatureServiceProto .FeatureServiceSpec > featureServiceNameToSpec ;
35+ private final Map <String , FeatureServiceProto .FeatureServiceSpec > featureServiceNameToSpec ;
3336
3437 Registry (RegistryProto .Registry registry ) {
3538 this .registry = registry ;
3639 List <FeatureViewProto .FeatureViewSpec > featureViewSpecs =
3740 registry .getFeatureViewsList ().stream ()
38- .map (fv -> fv . getSpec () )
41+ .map (FeatureView :: getSpec )
3942 .collect (Collectors .toList ());
4043 this .featureViewNameToSpec =
4144 featureViewSpecs .stream ()
4245 .collect (
4346 Collectors .toMap (FeatureViewProto .FeatureViewSpec ::getName , Function .identity ()));
4447 List <OnDemandFeatureViewProto .OnDemandFeatureViewSpec > onDemandFeatureViewSpecs =
4548 registry .getOnDemandFeatureViewsList ().stream ()
46- .map (odfv -> odfv . getSpec () )
49+ .map (OnDemandFeatureView :: getSpec )
4750 .collect (Collectors .toList ());
4851 this .onDemandFeatureViewNameToSpec =
4952 onDemandFeatureViewSpecs .stream ()
@@ -53,7 +56,7 @@ public class Registry {
5356 Function .identity ()));
5457 this .featureServiceNameToSpec =
5558 registry .getFeatureServicesList ().stream ()
56- .map (fs -> fs . getSpec () )
59+ .map (FeatureService :: getSpec )
5760 .collect (
5861 Collectors .toMap (
5962 FeatureServiceProto .FeatureServiceSpec ::getName , Function .identity ()));
0 commit comments