Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
标记函数参数的Java注释应该是线程安全的_Java_Java 8 - Fatal编程技术网

标记函数参数的Java注释应该是线程安全的

标记函数参数的Java注释应该是线程安全的,java,java-8,Java,Java 8,假设我有一个函数签名,如下所示- class CustomerStore { public void processCustomerInfo(final BiConsumer<Integer, CustomerInfo.V> consumer) throws Exception } 您可以创建自定义注释。没有这样的批注。可能会有帮助。您可以创建自定义批注。没有这样的注释。可能会有帮助。 final Map<Integer, CustomerInfo.V> cus

假设我有一个函数签名,如下所示-

class CustomerStore {
    public void processCustomerInfo(final BiConsumer<Integer, CustomerInfo.V> consumer) throws Exception
}

您可以创建自定义注释。没有这样的批注。可能会有帮助。您可以创建自定义批注。没有这样的注释。可能会有帮助。
final Map<Integer, CustomerInfo.V> cust = new HashMap<>(); // Should be ConcurrentHashMap
fdbCustomerStore.processCustomerInfo((cid, v) -> cust.put(cid, v));