你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ResourceCounter Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. ResourceCounter
- com.
Implements
public final class ResourceCounter
implements JsonSerializable<ResourceCounter>
Represents a resource's usage and quota.
Constructor Summary
Constructor | Description |
---|---|
ResourceCounter(long usage) |
Creates an instance of Resource |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Resource |
fromJson(JsonReader jsonReader)
Reads an instance of Resource |
Long |
getQuota()
Get the quota property: The resource amount quota. |
long |
getUsage()
Get the usage property: The resource usage amount. |
Resource |
setQuota(Long quota)
Set the quota property: The resource amount quota. |
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
ResourceCounter
public ResourceCounter(long usage)
Creates an instance of ResourceCounter class.
Parameters:
Method Details
fromJson
public static ResourceCounter fromJson(JsonReader jsonReader)
Reads an instance of ResourceCounter from the JsonReader.
Parameters:
Returns:
Throws:
getQuota
public Long getQuota()
Get the quota property: The resource amount quota.
Returns:
getUsage
public long getUsage()
Get the usage property: The resource usage amount.
Returns:
setQuota
public ResourceCounter setQuota(Long quota)
Set the quota property: The resource amount quota.
Parameters:
Returns: