替换线程不安全的map
This commit is contained in:
parent
e9476821e1
commit
762507def6
@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.transmit.callback;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@ -24,7 +25,7 @@ public class DeferredResultHolder {
|
|||||||
|
|
||||||
public static final String CALLBACK_CMD_PlAY = "CALLBACK_PLAY";
|
public static final String CALLBACK_CMD_PlAY = "CALLBACK_PLAY";
|
||||||
|
|
||||||
private Map<String, DeferredResult> map = new HashMap<String, DeferredResult>();
|
private Map<String, DeferredResult> map = new ConcurrentHashMap<String, DeferredResult>();
|
||||||
|
|
||||||
public void put(String key, DeferredResult result) {
|
public void put(String key, DeferredResult result) {
|
||||||
map.put(key, result);
|
map.put(key, result);
|
||||||
|
Loading…
Reference in New Issue
Block a user