Skip to content

Add "probe" method to check if client is still connected to the server #512

@jtnelson

Description

@jtnelson
  • Add probe method to Concourse client
  • Add probe method to the ConnectionPool that pulls a random connection and tests whether it is still connected
  • Implementation in 0.11 can call inventory() to see if the connection is still alive
  • In 0.12 add a thrift method called probe that returns true
  • In the client catch an exception for a broken pipe or inability to write and return false
  • Consider adding a reconnect() method that can be used to reestablish the connection if the probe fails
/**
 * Probes the current connection to the server.
 * <p>
 * This method checks if the client is still connected to the server by sending a query or signal
 * and awaiting a response. It is used to ensure the client's ability to communicate with the server
 * remains intact.
 * 
 * @return boolean - {@code true} if the client is currently connected to the server,
 *                   {@code false} otherwise.
 */
public boolean probe() {
    // implementation code here
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions