[VOL-3001] Separating flows, groups and meters from LogicalDevice.
- This is to improve the performance of flow addition to system.
- This patch does not include separation of the flows from Device. It will be implemented in another patch.
- Flows, groups and meters are kept in store by their unique ids per logical device, and cached into a map with these unique ids per logical device again.
Accessing to this store and map is synchronized by a RWLock.
Also a lock is kept in memory per flow, meter and group to synchronize the modifications (add/modify/delete requests) per flow/meter/group.
Change-Id: Ic0135faef0bbd1664693375fa6527e0242919e6d
diff --git a/rw_core/core/device/agent.go b/rw_core/core/device/agent.go
index 940bf1c..901b27f 100755
--- a/rw_core/core/device/agent.go
+++ b/rw_core/core/device/agent.go
@@ -21,13 +21,14 @@
"encoding/hex"
"errors"
"fmt"
+ "reflect"
+ "sync"
+ "time"
+
"github.com/golang/protobuf/ptypes"
"github.com/opencord/voltha-go/rw_core/core/adapter"
"github.com/opencord/voltha-go/rw_core/core/device/remote"
"github.com/opencord/voltha-lib-go/v3/pkg/kafka"
- "reflect"
- "sync"
- "time"
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/db/model"