Package graphql

Class GraphQLUnusualConfiguration.PropertyDataFetcherConfig

  • Enclosing class:
    GraphQLUnusualConfiguration

    public static class GraphQLUnusualConfiguration.PropertyDataFetcherConfig
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GraphQLUnusualConfiguration.PropertyDataFetcherConfig clearReflectionCache()
      PropertyDataFetcher caches the methods and fields that map from a class to a property for runtime performance reasons as well as negative misses.
      boolean setUseNegativeCache​(boolean flag)
      This can be used to control whether PropertyDataFetcher will cache negative lookups for a property for performance reasons.
      boolean setUseSetAccessible​(boolean flag)
      This can be used to control whether PropertyDataFetcher will use Method.setAccessible(boolean) to gain access to property values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clearReflectionCache

        public GraphQLUnusualConfiguration.PropertyDataFetcherConfig clearReflectionCache()
        PropertyDataFetcher caches the methods and fields that map from a class to a property for runtime performance reasons as well as negative misses.

        However during development you might be using an assistance tool like JRebel to allow you to tweak your code base and this caching may interfere with this. So you can call this method to clear the cache. A JRebel plugin could be developed to do just that.

      • setUseSetAccessible

        public boolean setUseSetAccessible​(boolean flag)
        This can be used to control whether PropertyDataFetcher will use Method.setAccessible(boolean) to gain access to property values. By default, it PropertyDataFetcher WILL use setAccessible.
        Parameters:
        flag - whether to use setAccessible
        Returns:
        the previous value of the flag
      • setUseNegativeCache

        public boolean setUseNegativeCache​(boolean flag)
        This can be used to control whether PropertyDataFetcher will cache negative lookups for a property for performance reasons. By default it PropertyDataFetcher WILL cache misses.
        Parameters:
        flag - whether to cache misses
        Returns:
        the previous value of the flag