Package com.illumon.iris.db.v2.locations
Class CompositeTableDataService
java.lang.Object
com.illumon.iris.db.v2.locations.AbstractTableDataService
com.illumon.iris.db.v2.locations.CompositeTableDataService
- All Implemented Interfaces:
TableDataService
public class CompositeTableDataService extends AbstractTableDataService
Routing TableDataService that applies a selector function to pick service(s) for each request.
It is assumed that each service will provide access to a non-overlapping set of table locations for any table key.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCompositeTableDataService.ServiceSelectorNested classes/interfaces inherited from interface com.illumon.iris.db.v2.locations.TableDataService
TableDataService.Null -
Constructor Summary
Constructors Constructor Description CompositeTableDataService(String name, CompositeTableDataService.ServiceSelector serviceSelector) -
Method Summary
Modifier and Type Method Description Stringdescribe()Like toString, but with more detail.protected TableLocationProvidermakeTableLocationProvider(TableKey tableKey)voidreset()Forget all state for future requests.voidreset(TableKey key)Forget all state for a single table.StringtoString()Methods inherited from class com.illumon.iris.db.v2.locations.AbstractTableDataService
getName, getTableLocationProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.locations.TableDataService
getTableLocationProvider
-
Constructor Details
-
CompositeTableDataService
public CompositeTableDataService(@NotNull String name, @NotNull CompositeTableDataService.ServiceSelector serviceSelector)- Parameters:
name- optional name for this serviceserviceSelector- Function to map a table key to a set of services that should be queried.
-
-
Method Details
-
reset
public void reset()Description copied from interface:TableDataServiceForget all state for future requests.- Specified by:
resetin interfaceTableDataService- Overrides:
resetin classAbstractTableDataService
-
reset
Description copied from interface:TableDataServiceForget all state for a single table.- Specified by:
resetin interfaceTableDataService- Overrides:
resetin classAbstractTableDataService
-
makeTableLocationProvider
- Specified by:
makeTableLocationProviderin classAbstractTableDataService
-
toString
-
describe
Description copied from interface:TableDataServiceLike toString, but with more detail.- Returns:
- a description string
-