Package org.voltdb.client
Class ClientAffinityStats
java.lang.Object
org.voltdb.client.ClientAffinityStats
Collect the client's opinion of the operation of client affinity.
Single-partition procedures
For the given partition id, affinityWrites and affinityReads track transactions that the client believes it knows the master for, and for which it has an active network connection.
rrWrites and rrReads reflect transactions routed using round-robin, which can happen if the client has no active connection to the partition master.
Multi-partition procedures
Multipartitioned procedures are treated as single-partition procedures,
using the special partition id 16383
.
Other cases
A statistics entry with partition id -1
is used when:
- The client has not yet acquired partitioning data from the VoltDB server.
- The procedure name is not yet known to the client, or does not exist in the catalog.
- The application has failed to provide a value for the partitioning column.
- The procedure is a 'compound procedure'; this type of procedure has no natural affinity to any one node.
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone()
static ClientAffinityStats
diff
(ClientAffinityStats newer, ClientAffinityStats older) Subtract one ClientAffinityStats instance from another to produce a third.long
Get the number of reads that used affinity for this time period.long
Get the number of writes that used affinity for this time period.long
Get the number of reads that used round-robin distribution for this time period.long
Get the number of writes that used round-robin distribution for this time period.toString()
-
Method Details
-
diff
Subtract one ClientAffinityStats instance from another to produce a third.- Parameters:
newer
- More recent ClientAffinityStats instance.older
- Less recent ClientAffinityStats instance.- Returns:
- New instance representing the difference.
-
clone
-
getAffinityWrites
public long getAffinityWrites()Get the number of writes that used affinity for this time period.- Returns:
- The count as a long.
-
getRrWrites
public long getRrWrites()Get the number of writes that used round-robin distribution for this time period.- Returns:
- The count as a long.
-
getAffinityReads
public long getAffinityReads()Get the number of reads that used affinity for this time period.- Returns:
- The count as a long.
-
getRrReads
public long getRrReads()Get the number of reads that used round-robin distribution for this time period.- Returns:
- The count as a long.
-
toString
-