Class DndSessionFactoryBarrage
java.lang.Object
io.deephaven.enterprise.dnd.client.DndSessionFactoryBarrage
A factory class for creating
barrage sessions.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.arrow.memory.RootAllocator -
Constructor Summary
ConstructorsConstructorDescriptionDndSessionFactoryBarrage(String serverUrl) Create a newDndSessionFactoryBarragefor fetching barrage tables from a Persistent Query -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close all resources and connections with the server.createPersistentQueryConfig(String name, float heapSizeGb, long autoDeleteTimeoutMillis) Create a new Interactive Console Persistent Query configuration with a language set to `Python`voidUse a delegate token to authenticate; automatically calling the defaultAuthenticationClientManager.voiddelegateToken(AuthToken delegateToken) Use a delegate token to authenticate.protected voidgetPQ(long serial) Get aPersistentQueryInfoMessagefor the specified PQ serial.Get aPersistentQueryInfoMessagefor the specified PQ name.protected DndSessionBarragemakeSession(PersistentQueryInfoMessage qConfig, AuthToken authToken, boolean deleteOnClose, DeephavenClusterConnection connection) newWorker(PersistentQueryConfigMessage message, long startupTimeoutMillis) Create a new Interactive Console Persistent Query session.voidAuthenticate with the server using a username and passwordpersistentQuery(long serial) Create a newDndSessionto the specified Persistent Query by serial.persistentQuery(String name) Create a newDndSessionto the specified Persistent Query by name.voidprivateKey(String keyFile) Authenticate to the server using a private key file.voidsetIncomingAllocator(org.apache.arrow.memory.RootAllocator incomingAllocator) Set the incoming allocator for this factory.voidsetMaxInboundMessageSize(int maxInboundMessageSize)
-
Field Details
-
incomingAllocator
protected org.apache.arrow.memory.RootAllocator incomingAllocator
-
-
Constructor Details
-
DndSessionFactoryBarrage
Create a newDndSessionFactoryBarragefor fetching barrage tables from a Persistent Query- Parameters:
serverUrl- the url to the server- Throws:
IOException- if there was a problem connecting to the server
-
-
Method Details
-
doOnAuthenticated
protected void doOnAuthenticated() -
makeSession
protected DndSessionBarrage makeSession(PersistentQueryInfoMessage qConfig, AuthToken authToken, boolean deleteOnClose, DeephavenClusterConnection connection) throws IOException - Throws:
IOException
-
close
public void close()Close all resources and connections with the server. -
setIncomingAllocator
public void setIncomingAllocator(@NotNull org.apache.arrow.memory.RootAllocator incomingAllocator) Set the incoming allocator for this factory. This allocator is used as the root allocator for the flight client of theDndSession. Otherwise, the flight client will instantiate a new RootAllocator to use. This setter must be called before the concretemakeSession(io.deephaven.proto.controller.PersistentQueryInfoMessage, io.deephaven.enterprise.auth.AuthToken, boolean, io.deephaven.enterprise.dnd.client.DeephavenClusterConnection)is called if you want to use the incoming allocator for the flight client.- Parameters:
incomingAllocator- the RootAllocator to use for flight client
-
getConnection
- Returns:
- the
DeephavenClusterConnectionused by this factory to connect to the server.
-
password
Authenticate with the server using a username and password- Parameters:
user- the usernamepassword- the password
-
privateKey
Authenticate to the server using a private key file.- Parameters:
keyFile- the private key file
-
delegateToken
Use a delegate token to authenticate. -
delegateToken
public void delegateToken()Use a delegate token to authenticate; automatically calling the defaultAuthenticationClientManager.This is suitable for use within a single Deephaven cluster, when one authenticated worker should connect as the same user to another worker.
-
createPersistentQueryConfig
public PersistentQueryConfigMessage.Builder createPersistentQueryConfig(@NotNull String name, float heapSizeGb, long autoDeleteTimeoutMillis) Create a new Interactive Console Persistent Query configuration with a language set to `Python`- Parameters:
name- the name to create withheapSizeGb- the desired heap size in GBautoDeleteTimeoutMillis- how long the query should remain if all clients disconnect- Returns:
- a new
PersistentQueryConfigMessage.Builderto use withnewWorker(PersistentQueryConfigMessage, long)
-
newWorker
public DndSessionBarrage newWorker(@NotNull String name, float heapSizeGb, long autoDeleteTimeoutMillis, long startupTimeoutMillis) throws IOException - Throws:
IOException
-
newWorker
public DndSessionBarrage newWorker(@NotNull PersistentQueryConfigMessage message, long startupTimeoutMillis) throws IOException Create a new Interactive Console Persistent Query session.- Parameters:
message- thePersistentQueryInfoMessageto create the Persistent Query withstartupTimeoutMillis- the timeout for starting the query- Returns:
- a new
DndSessionFactoryBasefor communicating with the Persistent Query. - Throws:
IOException- if there was a problem creating the Persistent Query
-
persistentQuery
Create a newDndSessionto the specified Persistent Query by name.- Parameters:
name- the name of the Persistent Query- Returns:
- a new
DndSessionfor communicating with the Persistent Query. - Throws:
IOException- if there was a problem creating the Persistent Query
-
persistentQuery
Create a newDndSessionto the specified Persistent Query by serial.- Parameters:
serial- the name of the Persistent Query- Returns:
- a new
DndSessionfor communicating with the Persistent Query. - Throws:
IOException- if there was a problem creating the Persistent Query
-
setMaxInboundMessageSize
public void setMaxInboundMessageSize(int maxInboundMessageSize) -
getPQ
Get aPersistentQueryInfoMessagefor the specified PQ serial.- Parameters:
serial- the PQ's serial- Returns:
- the
PersistentQueryInfoMessage, or null if the PQ doesn't exist
-
getPQ
Get aPersistentQueryInfoMessagefor the specified PQ name.- Parameters:
name- the PQ's name- Returns:
- the
PersistentQueryInfoMessage, or null if the PQ doesn't exist
-