Class DefaultAutomaticPersistedQueriesCache

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      CompletableFuture<PreparsedDocumentEntry> getOrElse(String key, ExecutionInput executionInput, Function0<PreparsedDocumentEntry> supplier) Get the PreparsedDocumentEntry associated with the key from the cache.
      • Methods inherited from class com.expediagroup.graphql.apq.cache.AutomaticPersistedQueriesCache

        getPersistedQueryDocumentAsync
      • Methods inherited from class java.lang.Object

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

      • DefaultAutomaticPersistedQueriesCache

        DefaultAutomaticPersistedQueriesCache()
    • Method Detail

      • getOrElse

         CompletableFuture<PreparsedDocumentEntry> getOrElse(String key, ExecutionInput executionInput, Function0<PreparsedDocumentEntry> supplier)

        Get the PreparsedDocumentEntry associated with the key from the cache.

        If the PreparsedDocumentEntry is missing in the cache, the supplier will provide one, and then it should be added to the cache.

        Parameters:
        key - The hash of the requested query.
        executionInput - the resource that GraphQL operation.
        supplier - that will provide the document in case there is a cache miss.