Server device driver extensions
* Additional behaviours implemented
* BasicSystemOperations
* DeviceHandshaker
* InterfaceConfig
* PortAdmin
* QueueConfig
* TableStatisticsDiscovery
* DeviceSystemStatisticsQuery
* New device abstractions on CPU cache and main memory
* Additional statistics (main memory)
* New UI with Memory statistics (based on the old gui)
* Constants decoupled from implementations
* More builders used for interface implementations
* Style fixes and refactoring
Change-Id: Ie54ed0fb4760456cfd6339c74b36486dd3c20f87
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
diff --git a/drivers/server/src/main/java/org/onosproject/drivers/server/devices/cpu/BasicCpuCacheDevice.java b/drivers/server/src/main/java/org/onosproject/drivers/server/devices/cpu/BasicCpuCacheDevice.java
new file mode 100644
index 0000000..5f2db0f
--- /dev/null
+++ b/drivers/server/src/main/java/org/onosproject/drivers/server/devices/cpu/BasicCpuCacheDevice.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.server.devices.cpu;
+
+/**
+ * Represents an abstraction of a CPU cache.
+ */
+public interface BasicCpuCacheDevice {
+
+ /**
+ * Returns the ID of this cache.
+ * A CPU cache ID is a pair of CPU cache level and type.
+ *
+ * @return cache ID
+ */
+ CpuCacheId cacheId();
+
+ /**
+ * Returns the placement policy of this cache.
+ *
+ * @return cache placement policy
+ */
+ CpuCachePlacementPolicy policy();
+
+ /**
+ * Returns the vendor of this cache.
+ * Typically, a cache is part of a CPU,
+ * therefore shares the same vendor.
+ *
+ * @return cache vendor
+ */
+ CpuVendor vendor();
+
+ /**
+ * Returns the capacity of this cache in kilo bytes.
+ *
+ * @return cache capacity in kilo bytes
+ */
+ long capacity();
+
+ /**
+ * Returns the number of sets this cache is split across.
+ *
+ * @return number of cache sets
+ */
+ int sets();
+
+ /**
+ * Returns the ways of associativity of this cache.
+ *
+ * @return ways of associativity
+ */
+ int associativityWays();
+
+ /**
+ * Returns the cache line's length in bytes.
+ *
+ * @return cache line's length in bytes
+ */
+ int lineLength();
+
+ /**
+ * Returns whether this CPU cache is shared among multiple cores
+ * or dedicated to a specific core.
+ *
+ * @return sharing status of the CPU cache
+ */
+ boolean isShared();
+
+}