Class TableDataProtocolDriverImpl
java.lang.Object
com.illumon.iris.db.v2.locations.protocol.TableDataProtocolDriverImpl
- All Implemented Interfaces:
TableDataProtocolDriver
Remote
TableDataService
implementation.-
Constructor Summary
ConstructorsConstructorDescriptionTableDataProtocolDriverImpl
(com.fishlib.io.sched.Scheduler scheduler, com.fishlib.io.logger.Logger log, String name, long requestTimeoutMillis, boolean allowIOMessageFlush) Construct a new remote table data service, ready to be connected. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
connect
(com.fishlib.base.Function.Nullary<SocketAddress> addressFunction) Connect to a remote server by address function, allowing fallback to different server addresses.void
Connect to a remote server.void
connect
(InetSocketAddress address) Connect to a remote server.connectLocalServer
(String name) removePendingRequest
(long requestKey) void
shutdown()
-
Constructor Details
-
TableDataProtocolDriverImpl
public TableDataProtocolDriverImpl(@NotNull com.fishlib.io.sched.Scheduler scheduler, @NotNull com.fishlib.io.logger.Logger log, @NotNull String name, long requestTimeoutMillis, 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 requestsallowIOMessageFlush
- allow synchronous flush of message buffers
-
-
Method Details
-
authenticate
public void authenticate()- Specified by:
authenticate
in interfaceTableDataProtocolDriver
-
connect
Description copied from interface:TableDataProtocolDriver
Connect to a remote server.- Specified by:
connect
in interfaceTableDataProtocolDriver
- Parameters:
address
- The host/port to connect to- Throws:
IOException
-
connect
Description copied from interface:TableDataProtocolDriver
Connect to a remote server.- Specified by:
connect
in interfaceTableDataProtocolDriver
- Parameters:
host
- The host to connect toport
- The port to connect to- Throws:
IOException
-
connect
public void connect(@NotNull com.fishlib.base.Function.Nullary<SocketAddress> addressFunction) throws IOException Description copied from interface:TableDataProtocolDriver
Connect to a remote server by address function, allowing fallback to different server addresses.- Specified by:
connect
in interfaceTableDataProtocolDriver
- Parameters:
addressFunction
- The address function to determine each connection attempt's host and port- Throws:
IOException
-
connectLocalServer
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceTableDataProtocolDriver
-
removePendingRequest
- Specified by:
removePendingRequest
in interfaceTableDataProtocolDriver
-
takeOrAllocateFreeRequest
- Specified by:
takeOrAllocateFreeRequest
in interfaceTableDataProtocolDriver
-
getLogPrefix
- Specified by:
getLogPrefix
in interfaceTableDataProtocolDriver
-