Interface ICounter
A counter is a simple incrementing and decrementing 64-bit integer. Each operation can also be applied to a item from a set and the counter will store individual count for each set item.
Namespace:App.Metrics.Counter.Abstractions
Assembly:cs.temp.dll.dll
Syntax
public interface ICounter : IResetableMetric
Methods
Decrement()
Declaration
void Decrement()
Decrement(MetricSetItem)
Declaration
void Decrement(MetricSetItem setItem)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem |
Decrement(MetricSetItem, Int64)
Declaration
void Decrement(MetricSetItem setItem, long amount)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem | |
System.Int64 | amount |
Decrement(Int64)
Decrement the counter value with a specified amount.
Declaration
void Decrement(long amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | amount | The amount with which to increment the counter. |
Decrement(String)
Decrement the counter value for an item from a set. The counter value is decremented but the counter will also keep track and decrement another counter associated with the setItem. The counter value will contain the total count and for each item the specific count and percentage of total count.
Declaration
void Decrement(string setItem)
Parameters
Type | Name | Description |
---|---|---|
System.String | setItem | Item from the set for which to increment the counter value. |
Decrement(String, Int64)
Decrement the counter value with a specified amount for an item from a set. The counter value is decremented but the counter will also keep track and decrement another counter associated with the setItem. The counter value will contain the total count and for each item the specific count and percentage of total count.
Declaration
void Decrement(string setItem, long amount)
Parameters
Type | Name | Description |
---|---|---|
System.String | setItem | Item from the set for which to increment the counter value. |
System.Int64 | amount | The amount with which to increment the counter. |
Increment()
Increment the counter value.
Declaration
void Increment()
Increment(MetricSetItem)
Declaration
void Increment(MetricSetItem setItem)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem |
Increment(MetricSetItem, Int64)
Declaration
void Increment(MetricSetItem setItem, long amount)
Parameters
Type | Name | Description |
---|---|---|
MetricSetItem | setItem | |
System.Int64 | amount |
Increment(Int64)
Increment the counter value with a specified amount.
Declaration
void Increment(long amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | amount | The amount with which to increment the counter. |
Increment(String)
Increment the counter value for an item from a set. The counter value is incremented but the counter will also keep track and increment another counter associated with the setItem. The counter value will contain the total count and for each item the specific count and percentage of total count.
Declaration
void Increment(string setItem)
Parameters
Type | Name | Description |
---|---|---|
System.String | setItem | Item from the set for which to increment the counter value. |
Increment(String, Int64)
Increment the counter value with a specified amount for an item from a set. The counter value is incremented but the counter will also keep track and increment another counter associated with the setItem. The counter value will contain the total count and for each item the specific count and percentage of total count.
Declaration
void Increment(string setItem, long amount)
Parameters
Type | Name | Description |
---|---|---|
System.String | setItem | Item from the set for which to increment the counter value. |
System.Int64 | amount | The amount with which to increment the counter. |