Package com.illumon.iris.db.v2.routing
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn all properties as a map.getProperty
(String propertyName) Return the named property value, or null.<T> T
getProperty
(String propertyName, T defaultValue) Return the named property value, with the type indicated by the default value.
-
Constructor Details
-
NullPropertyProvider
public NullPropertyProvider()
-
-
Method Details
-
getProperty
Description copied from interface:DataRoutingService.PropertyProvider
Return the named property value, or null.- Specified by:
getProperty
in interfaceDataRoutingService.PropertyProvider
- Parameters:
propertyName
- the name of the property to fetch- Returns:
- the value of the property, or null if not set
-
getProperty
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 interfaceDataRoutingService.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 fetchdefaultValue
- the typed default value to return if the property is not set- Returns:
- the value of the property, or null if not set
-
getAllProperties
Description copied from interface:DataRoutingService.PropertyProvider
Return all properties as a map. This is useful for interactions outside the DB project.- Specified by:
getAllProperties
in interfaceDataRoutingService.PropertyProvider
- Returns:
- a map containing all keys and values for this provider
-