Class StringToReadPreferenceConverter

java.lang.Object
io.micronaut.configuration.mongo.core.convert.StringToReadPreferenceConverter
All Implemented Interfaces:
io.micronaut.core.convert.TypeConverter<CharSequence,com.mongodb.ReadPreference>

public class StringToReadPreferenceConverter extends Object implements io.micronaut.core.convert.TypeConverter<CharSequence,com.mongodb.ReadPreference>
Converters strings to ReadPreference objects.
Since:
1.0
Author:
graemerocher
  • Constructor Details

    • StringToReadPreferenceConverter

      public StringToReadPreferenceConverter()
  • Method Details

    • convert

      public Optional<com.mongodb.ReadPreference> convert(CharSequence object, Class<com.mongodb.ReadPreference> targetType, io.micronaut.core.convert.ConversionContext context)
      Specified by:
      convert in interface io.micronaut.core.convert.TypeConverter<CharSequence,com.mongodb.ReadPreference>