All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.functions.redis.annotation.RedisInput Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.azure.functions.redis.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.microsoft.azure.functions.annotation.CustomBinding;

/**
 * 

* Java annotation for input binding that excutes a command on the redis instances. *

* *

* Example function that uses a RedisInput binding: *

* *
 * @FunctionName("RedisInputExample")
 * public void run(
 *         @RedisPubSubTrigger(connection = "ConnectionString", channel = "__keyevent@0__:set") String key,
 *         @RedisInput(connection = "ConnectionString", command = "GET {Message}") String value,
 *         final ExecutionContext context) {
 *     context.getLogger().info("Key '" + key + '" was set to "' + value + '"');
 * }
 * 
*/ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) @CustomBinding(direction = "in", name = "", type = "redis") public @interface RedisInput { /** * The variable name used in function.json. * @return The variable name used in function.json. */ String name(); /** * App setting name that contains Redis connection information. */ String connection(); /** * The command to be executed on the cache. * @return The command to be executed on the cache. */ String command(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy