Class DynamicTableDataService
java.lang.Object
com.illumon.iris.db.v2.locations.server.DelegatingTableDataService
com.illumon.iris.db.v2.locations.server.DynamicTableDataService
- All Implemented Interfaces:
TableDataService
,TableDataServiceKey
,NamedImplementation
public class DynamicTableDataService
extends DelegatingTableDataService
implements TableDataServiceKey
A TableDataService that can be dynamically updated when the source DataRoutingService changes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.tabledataservice.TableDataService
TableDataService.Null
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicTableDataService
(TableDataServiceFactory.TdsID id, TableDataService delegate, TableDataServiceFactory.CreationContext creationContext) Create a new DynamicTableDataService. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()
Like toString, but with more detail.protected TableDataService
getId()
getKey()
Use object identity for the key, equals, and hashCode (TableDataServices of this type won't equal each other).void
setDelegate
(TableDataService delegate, TableDataServiceFactory.CreationContext creationContext) Replace the delegate TableDataService.Methods inherited from class com.illumon.iris.db.v2.locations.server.DelegatingTableDataService
authenticate, getKnownLocationProviders, getName, getTableLocationProvider, getTableLocationProvider, reset, reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.util.type.NamedImplementation
getImplementationName
Methods inherited from interface com.illumon.iris.db.v2.tabledataservice.TableDataService
shutdown
-
Constructor Details
-
DynamicTableDataService
public DynamicTableDataService(TableDataServiceFactory.TdsID id, TableDataService delegate, TableDataServiceFactory.CreationContext creationContext) Create a new DynamicTableDataService.- Parameters:
id
- the information required to uniquely identify this TableDataServicedelegate
- the TableDataService to delegate to (which can change)creationContext
- the collection of services used to create this TableDataService
-
-
Method Details
-
getDelegate
- Specified by:
getDelegate
in classDelegatingTableDataService
-
setDelegate
public void setDelegate(@NotNull TableDataService delegate, @NotNull TableDataServiceFactory.CreationContext creationContext) Replace the delegate TableDataService. The new delegate should have the save id as the old one.- Parameters:
delegate
- the new delegate TableDataServicecreationContext
- the CreationContext corresponding to the new delegate
-
getKey
Use object identity for the key, equals, and hashCode (TableDataServices of this type won't equal each other).- Specified by:
getKey
in interfaceTableDataService
- Returns:
- this
-
getId
-
getCreationContext
-
describe
Description copied from interface:TableDataService
Like toString, but with more detail.- Specified by:
describe
in interfaceTableDataService
- Overrides:
describe
in classDelegatingTableDataService
- Returns:
- a description string
-