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

com.microsoft.azure.functions.redis.annotation.RedisListTrigger 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 used to bind a parameter to a Redis list entry. *

* *

* Example function that uses a RedisListTrigger binding: *

* *
 * @FunctionName("RedisListExample")
 * public void run(
 *         @RedisListTrigger(connection = "ConnectionString", key = "listkey") String entry,
 *         final ExecutionContext context) {
 *     context.getLogger().info("Java Redis List trigger function processed a list entry: " + entry);
 * }
 * 
*/ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.PARAMETER) @CustomBinding(direction = "in", name = "", type = "redisListTrigger") public @interface RedisListTrigger { /** * The variable name used in function.json. * @return The variable name used in function.json. */ String name(); /** *

Defines how Functions runtime should treat the parameter value. Possible values are:

*
    *
  • "": get the value as a string, and try to deserialize to actual parameter type like POJO
  • *
  • string: always get the value as a string
  • *
  • binary: get the value as a binary data, and try to deserialize to actual parameter type byte[]
  • *
* @return The dataType which will be used by the Functions runtime. */ String dataType() default ""; /** * App setting name that contains Redis connection information. */ String connection(); /** * Key to read from. * @return Key to read from. */ String key(); /** * How often to poll Redis in milliseconds. * @return How often to poll Redis in milliseconds. */ int pollingIntervalInMs(); /** * Number of entries to pull from Redis at one time. * @return Number of entries to pull from Redis at one time. */ int maxBatchSize(); /** * The direction to pop elements from the list.. * @return The direction to pop elements from the list. */ ListDirection listDirection(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy