Package org.apache.cassandra.transport
Class ClientResourceLimits
- java.lang.Object
-
- org.apache.cassandra.transport.ClientResourceLimits
-
public class ClientResourceLimits extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientResourceLimits.Overload
-
Field Summary
Fields Modifier and Type Field Description static NonBlockingRateLimiter
GLOBAL_REQUEST_LIMITER
-
Constructor Summary
Constructors Constructor Description ClientResourceLimits()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.cassandra.transport.ClientResourceLimits.Allocator
getAllocatorForEndpoint(java.net.InetAddress endpoint)
static long
getCurrentGlobalUsage()
static com.codahale.metrics.Snapshot
getCurrentIpUsage()
static long
getEndpointLimit()
static long
getGlobalLimit()
static int
getNativeTransportMaxRequestsPerSecond()
static com.codahale.metrics.Reservoir
ipUsageReservoir()
This will recompute the ip usage histo on each query of the snapshot when requested instead of trying to keep a histogram up to date with each requeststatic void
setEndpointLimit(long newLimit)
static void
setGlobalLimit(long newLimit)
static void
setNativeTransportMaxRequestsPerSecond(int newPerSecond)
-
-
-
Field Detail
-
GLOBAL_REQUEST_LIMITER
public static final NonBlockingRateLimiter GLOBAL_REQUEST_LIMITER
-
-
Method Detail
-
getAllocatorForEndpoint
public static org.apache.cassandra.transport.ClientResourceLimits.Allocator getAllocatorForEndpoint(java.net.InetAddress endpoint)
-
getGlobalLimit
public static long getGlobalLimit()
-
setGlobalLimit
public static void setGlobalLimit(long newLimit)
-
getCurrentGlobalUsage
public static long getCurrentGlobalUsage()
-
getEndpointLimit
public static long getEndpointLimit()
-
setEndpointLimit
public static void setEndpointLimit(long newLimit)
-
getCurrentIpUsage
public static com.codahale.metrics.Snapshot getCurrentIpUsage()
-
getNativeTransportMaxRequestsPerSecond
public static int getNativeTransportMaxRequestsPerSecond()
-
setNativeTransportMaxRequestsPerSecond
public static void setNativeTransportMaxRequestsPerSecond(int newPerSecond)
-
ipUsageReservoir
public static com.codahale.metrics.Reservoir ipUsageReservoir()
This will recompute the ip usage histo on each query of the snapshot when requested instead of trying to keep a histogram up to date with each request
-
-