Class RemoteTableDataService
java.lang.Object
com.illumon.iris.db.v2.locations.AbstractTableDataService
com.illumon.iris.db.v2.locations.remote.RemoteTableDataService
- All Implemented Interfaces:
TableDataService
public class RemoteTableDataService extends AbstractTableDataService
Remote
TableDataService implementation.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.locations.TableDataService
TableDataService.Null -
Constructor Summary
Constructors Constructor Description RemoteTableDataService(com.fishlib.io.sched.Scheduler scheduler, com.fishlib.io.logger.Logger log, String name, long requestTimeoutMillis, boolean supportsSubscriptions, boolean allowIOMessageFlush)Construct a new remote table data service, ready to be connected. -
Method Summary
Modifier and Type Method Description RemoteTableDataServiceconnect(com.fishlib.base.Function.Nullary<SocketAddress> addressFunction)Connect to a remote server by address function, allowing fallback to different server addresses.RemoteTableDataServiceconnect(String host, int port)Connect to a remote server.RemoteTableDataServiceconnect(InetSocketAddress address)Connect to a remote server.TableDataProtocol.LocalServerconnectLocalServer(String name)Connect to an in-process server.Stringdescribe()Like toString, but with more detail.protected TableLocationProvidermakeTableLocationProvider(TableKey tableKey)voidshutdown()StringtoString()Methods inherited from class com.illumon.iris.db.v2.locations.AbstractTableDataService
getKnownLocationProviders, getName, getTableLocationProvider, reset, resetMethods 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
-
RemoteTableDataService
public RemoteTableDataService(@NotNull com.fishlib.io.sched.Scheduler scheduler, @NotNull com.fishlib.io.logger.Logger log, @NotNull String name, long requestTimeoutMillis, boolean supportsSubscriptions, boolean allowIOMessageFlush)Construct a new remote table data service, ready to be connected.- Parameters:
scheduler- Job schedulerlog- Logger for outputname- Remote service namerequestTimeoutMillis- The timeout value to use for all requestssupportsSubscriptions- Whether the service underlying the the TableDataServiceExporter we connect to supports subscriptionsallowIOMessageFlush- allow synchronous flush of message buffers
-
-
Method Details
-
connect
Connect to a remote server.- Parameters:
address- The host/port to connect to- Returns:
- this
- Throws:
IOException
-
connect
Connect to a remote server.- Parameters:
host- The host to connect toport- The port to connect to- Returns:
- this
- Throws:
IOException
-
connect
public RemoteTableDataService connect(@NotNull com.fishlib.base.Function.Nullary<SocketAddress> addressFunction) throws IOExceptionConnect to a remote server by address function, allowing fallback to different server addresses.- Parameters:
addressFunction- The address function to determine each connection attempt's host and port- Returns:
- this
- Throws:
IOException
-
connectLocalServer
Connect to an in-process server.- Parameters:
name- The name to use for the server- Returns:
- this
-
shutdown
public void shutdown() -
makeTableLocationProvider
- Specified by:
makeTableLocationProviderin classAbstractTableDataService
-
toString
-
describe
Description copied from interface:TableDataServiceLike toString, but with more detail.- Returns:
- a description string
-