Class DummyVCacheRequestContextOperations

    • Constructor Detail

      • DummyVCacheRequestContextOperations

        public DummyVCacheRequestContextOperations()
    • Method Detail

      • doInRequestContext

        public <T,​X extends Throwable> T doInRequestContext​(VCacheRequestContextOperations.Action<T,​X> action)
                                                           throws X extends Throwable
        Description copied from interface: VCacheRequestContextOperations
        Executes the supplied action callback within a VCache RequestContext, using the system default partition identifier.
        Specified by:
        doInRequestContext in interface VCacheRequestContextOperations
        Type Parameters:
        T - the return type of the callback
        X - the exception type thrown by the callback
        Parameters:
        action - the callback to be executed within the request context
        Returns:
        the value returned by the callback
        Throws:
        X - the exception thrown by the callback
        X extends Throwable
      • doInRequestContext

        public <T,​X extends Throwable> T doInRequestContext​(String partitionIdentifier,
                                                                  VCacheRequestContextOperations.Action<T,​X> action)
                                                           throws X extends Throwable
        Description copied from interface: VCacheRequestContextOperations
        Executes the supplied action callback within a VCache RequestContext. If no request context is bound to the current thread, then one will be set up with the supplied partition identifier. Calls to this method may be nested. Nested calls will re-use the existing context bound by the first call. Nested calls must supply the same partition identifier as the first call.
        Specified by:
        doInRequestContext in interface VCacheRequestContextOperations
        Type Parameters:
        T - the return type of the callback
        X - the exception type thrown by the callback
        Parameters:
        partitionIdentifier - the partition identifier that will be used to create new request context, if necessary
        action - the callback to be executed within the request context
        Returns:
        the value returned by the callback
        Throws:
        X - the exception thrown by the callback
        X extends Throwable