src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp
changeset 54964 ec7d6d8effc7
parent 53244 9807daeb47c4
child 58154 060d9d139109
child 58863 c16ac7a2eba4
--- a/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp	Tue May 21 13:06:52 2019 -0400
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp	Tue May 21 20:53:27 2019 +0200
@@ -92,7 +92,6 @@
   size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); }
 };
 
-
 template <typename Operation>
 class MutexedWriteOp {
  private:
@@ -104,6 +103,15 @@
   size_t processed() const { return _operation.processed(); }
 };
 
+template <typename Operation>
+class ExclusiveOp : private MutexedWriteOp<Operation> {
+ public:
+  typedef typename Operation::Type Type;
+  ExclusiveOp(Operation& operation) : MutexedWriteOp<Operation>(operation) {}
+  bool process(Type* t);
+  size_t processed() const { return MutexedWriteOp<Operation>::processed(); }
+};
+
 enum jfr_operation_mode {
   mutexed = 1,
   concurrent