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 interface
CompositeTableDataService.ServiceSelector
Nested 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 String
describe()
Like toString, but with more detail.protected TableLocationProvider
makeTableLocationProvider(TableKey tableKey)
void
reset()
Forget all state for future requests.void
reset(TableKey key)
Forget all state for a single table.String
toString()
Methods inherited from class com.illumon.iris.db.v2.locations.AbstractTableDataService
getKnownLocationProviders, getName, getTableLocationProvider
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:TableDataService
Forget all state for future requests.- Specified by:
reset
in interfaceTableDataService
- Overrides:
reset
in classAbstractTableDataService
-
reset
Description copied from interface:TableDataService
Forget all state for a single table.- Specified by:
reset
in interfaceTableDataService
- Overrides:
reset
in classAbstractTableDataService
-
makeTableLocationProvider
- Specified by:
makeTableLocationProvider
in classAbstractTableDataService
-
toString
-
describe
Description copied from interface:TableDataService
Like toString, but with more detail.- Returns:
- a description string
-