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 classClientResourceLimits.Overload
-
Field Summary
Fields Modifier and Type Field Description static NonBlockingRateLimiterGLOBAL_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.AllocatorgetAllocatorForEndpoint(java.net.InetAddress endpoint)static longgetCurrentGlobalUsage()static com.codahale.metrics.SnapshotgetCurrentIpUsage()static longgetEndpointLimit()static longgetGlobalLimit()static intgetNativeTransportMaxRequestsPerSecond()static com.codahale.metrics.ReservoiripUsageReservoir()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 voidsetEndpointLimit(long newLimit)static voidsetGlobalLimit(long newLimit)static voidsetNativeTransportMaxRequestsPerSecond(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
-
-