private void registerShutdownHook(ShutdownHookRegistrar registrar) {
        registrar.registerShutdownHook(() -> {
            try {
                session.destroy();
            } catch (Exception e) {
                // Ignore exception on shutdown
            }
            try {
                documentAccess.shutdown();
            } catch (Exception e) {
                // Ignore exception on shutdown
            }
        });
    }
This class fetches bucket information from Vespa

@author bjorncs
vespaclient-java/src/main/java/com/yahoo/vespastat/BucketStatsRetriever.java