Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9049

ClientCache.close() functionality doesn't seem to match the Javadoc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.15.0
    • None
    • client/server
    • None

    Description

      While writing a simple application, I found that the ClientCache.close() method did not respond the way that was expected according to the Javadocs.

       

      The application code was:

       

      public static void main(String[] args) {
       ClientCache cache = new ClientCacheFactory().addPoolLocator("127.0.0.1", 10334).create();
      
        System.out.println(cache.getDefaultPool().getLocators());
      
        cache.close();
       
        System.out.println("Cache.close() called.");
        
      System.out.println(cache.getDefaultPool().getLocators());
      }
      

      The output was:

      [/127.0.0.1:10334]
      Cache.close() called.
      [/127.0.0.1:10334]
      

      According to the Javadocs for the cache.close() method, it seems that after calling cache.close() when a user calls cache.getDefaultPool().getLocators() the user should receive a CacheClosedException, instead of the locator address.

      This can be found in the Javadocs under Interface ClientCache -> close

      Attachments

        Activity

          People

            Unassigned Unassigned
            majohn John Martin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: