Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

137
Visualizações
Couchbase Server Status

I am using Spring data Couchbase in my application.I am using the CouchbaseOperations object to find out the cluster info with the following code.

List<Version> versions = this.couchbaseOperations.getCouchbaseClusterInfo().getAllVersions();

This gives me the version of the couchbase server which I am using.This is working fine. But the issue is that it always gives me the version of Couchbase Server irrespective of whether the server is up or down. So my use case is that, if my couchbase server is down, I need to display that Couchbase server is down.
So can anybody give me a method to check the status of Couchbase server using any inbuilt method in CouchbaseOperation object or CouchbaseTemplate object or any other method. Thanks in advance.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

It should be possible to check the status for every node of a bucket with

Integer timeoutInMs = 1000;
Bucket bucket = couchbaseConfig.couchbaseClient();
boolean isReachable = bucket.bucketManager().info().nodeList().get(0).isReachable(timeoutInMs);

If you have multiple buckets do this for every single one of them. If you have more nodes loop through them instead of only using get(0).

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda