2323import org .apache .ignite .internal .processors .cache .version .CacheVersionConflictResolver ;
2424import org .apache .ignite .internal .processors .cache .version .GridCacheVersionConflictContext ;
2525import org .apache .ignite .internal .processors .cache .version .GridCacheVersionedEntryEx ;
26- import org .apache .ignite .internal .processors .metric .MetricRegistryImpl ;
27- import org .apache .ignite .internal .processors .metric .impl .LongAdderMetric ;
2826import org .apache .ignite .internal .util .tostring .GridToStringInclude ;
2927import org .apache .ignite .internal .util .typedef .internal .S ;
3028import org .apache .ignite .internal .util .typedef .internal .U ;
4442 * </ul>
4543 */
4644public class CacheVersionConflictResolverImpl implements CacheVersionConflictResolver {
47- /** Accepted entries count name. */
48- public static final String ACCEPTED_EVENTS_CNT = "AcceptedCount" ;
49-
50- /** Accepted entries count description. */
51- public static final String ACCEPTED_EVENTS_CNT_DESC = "Count of accepted entries" ;
52-
53- /** Rejected entries count name. */
54- public static final String REJECTED_EVENTS_CNT = "RejectedCount" ;
55-
56- /** Rejected entries count description. */
57- public static final String REJECTED_EVENTS_CNT_DESC = "Count of rejected entries" ;
58-
5945 /**
6046 * Cluster id.
6147 */
@@ -80,32 +66,21 @@ public class CacheVersionConflictResolverImpl implements CacheVersionConflictRes
8066 @ GridToStringInclude
8167 protected final boolean conflictResolveFieldEnabled ;
8268
83- /** Accepted entries count. */
84- private final LongAdderMetric acceptedCnt ;
85-
86- /** Rejected entries count. */
87- private final LongAdderMetric rejectedCnt ;
88-
8969 /**
9070 * @param clusterId Data center id.
9171 * @param conflictResolveField Field to resolve conflicts.
9272 * @param log Logger.
93- * @param mreg Metric registry.
9473 */
9574 public CacheVersionConflictResolverImpl (
9675 byte clusterId ,
9776 String conflictResolveField ,
98- IgniteLogger log ,
99- MetricRegistryImpl mreg
77+ IgniteLogger log
10078 ) {
10179 this .clusterId = clusterId ;
10280 this .conflictResolveField = conflictResolveField ;
10381 this .log = log ;
10482
10583 conflictResolveFieldEnabled = conflictResolveField != null ;
106-
107- acceptedCnt = mreg .longAdderMetric (ACCEPTED_EVENTS_CNT , ACCEPTED_EVENTS_CNT_DESC );
108- rejectedCnt = mreg .longAdderMetric (REJECTED_EVENTS_CNT , REJECTED_EVENTS_CNT_DESC );
10984 }
11085
11186 /** {@inheritDoc} */
@@ -122,14 +97,10 @@ public CacheVersionConflictResolverImpl(
12297 if (log .isDebugEnabled ())
12398 debugResolve (ctx , useNew , oldEntry , newEntry );
12499
125- if (useNew ) {
100+ if (useNew )
126101 res .useNew ();
127- acceptedCnt .increment ();
128- }
129- else {
102+ else
130103 res .useOld ();
131- rejectedCnt .increment ();
132- }
133104
134105 return res ;
135106 }
0 commit comments