Class DataRoutingService.NullPropertyProvider

java.lang.Object
com.illumon.iris.db.v2.routing.DataRoutingService.NullPropertyProvider
All Implemented Interfaces:
DataRoutingService.PropertyProvider
Enclosing interface:
DataRoutingService

public static class DataRoutingService.NullPropertyProvider extends Object implements DataRoutingService.PropertyProvider
Implementation of "no properties".
  • Constructor Details

    • NullPropertyProvider

      public NullPropertyProvider()
  • Method Details

    • getProperty

      @Nullable public String getProperty(@NotNull String propertyName)
      Description copied from interface: DataRoutingService.PropertyProvider
      Return the named property value, or null.
      Specified by:
      getProperty in interface DataRoutingService.PropertyProvider
      Parameters:
      propertyName - the name of the property to fetch
      Returns:
      the value of the property, or null if not set
    • getProperty

      @NotNull public <T> T getProperty(@NotNull String propertyName, @NotNull T defaultValue)
      Description copied from interface: DataRoutingService.PropertyProvider
      Return the named property value, with the type indicated by the default value. If the property isn't set, return the default value.
      Specified by:
      getProperty in interface DataRoutingService.PropertyProvider
      Type Parameters:
      T - The return value will be cast to this type, as defined by the default value
      Parameters:
      propertyName - the name of the property to fetch
      defaultValue - the typed default value to return if the property is not set
      Returns:
      the value of the property, or null if not set
    • getProperties

      @NotNull public Map<String,String> getProperties()
      Description copied from interface: DataRoutingService.PropertyProvider
      Return all properties as a map. This is useful for interactions outside the DB project.
      Specified by:
      getProperties in interface DataRoutingService.PropertyProvider
      Returns:
      a map containing all keys and values for this provider