LogRecord Class
- java.
lang. Object - com.
microsoft. azure. storage. analytics. LogRecord
- com.
public class LogRecord
Represents a Storage Analytics Log record entry.
Field Summary
Modifier and Type | Field and Description |
---|---|
final SimpleDateFormat |
LAST_MODIFIED_TIME_FORMAT
Holds the date format for the LastModifiedTime field. |
final SimpleDateFormat |
REQUEST_START_TIME_FORMAT
Holds the date format for the RequestStartTime field. |
Constructor Summary
Constructor | Description |
---|---|
LogRecord() |
Initializes a new instance of the LogRecord class. |
LogRecord(LogRecordStreamReader reader) |
Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getAuthenticationType()
Gets whether the request was authenticated, anonymous, or used Shared Access Signature (SAS). |
String |
getClientRequestId()
Gets the x-ms-client-request-id header value included in the request. |
String |
getConditionsUsed()
Gets conditions used, as an encoded string semicolon-separated list in the form of ConditionName=value . |
Integer |
getEndToEndLatencyInMS()
Gets the total time in milliseconds to perform the requested operation, including the time to read the incoming request and send the response to the requester. |
String |
getETagIdentifier()
Gets the ETag identifier for the returned object as an encoded string. |
String |
getHttpStatusCode()
Gets the HTTP status code for the request. If the request is interrupted, this value may be set to Unknown. |
Date |
getLastModifiedTime()
Gets the Last Modified Time (LMT) for the returned object as an encoded string. This field is null for operations that can return multiple objects. |
Integer |
getOperationCount()
Gets the number of each logged operation for a request, using an index of zero. Some requests require more than one operation, such as Copy Blob, though most perform just one operation. |
String |
getOperationType()
Gets the type of REST operation performed. |
String |
getOwnerAccountName()
Gets the account name of the service owner. |
String |
getReferrerHeader()
Gets the Referrer header value as an encoded string. |
Long |
getRequestContentLength()
Gets the value of the Content-Length header for the request sent to the storage service. If the request was successful, this value is equal to request-packet-size. If a request is unsuccessful, this value may not be equal to request-packet-size, or it may be null. |
String |
getRequestedObjectKey()
Gets the key of the requested object as an encoded string. This field will always use the account name, even if a custom domain name has been configured. |
String |
getRequesterAccountName()
Gets the account name making the request, if the request is authenticated. This field will be null for anonymous and SAS requests. |
String |
getRequesterIPAddress()
Gets the IP address and port of the requester. |
Long |
getRequestHeaderSize()
Gets the size of the request header, in bytes. If a request is unsuccessful, this value may be null. |
UUID |
getRequestIdHeader()
Gets the request ID assigned by the storage service. This is equivalent to the value of the x-ms-request-id header. |
String |
getRequestMD5()
Gets the value of either the Content-MD5 header or the x-ms-content-md5 header in the request as an encoded string. The MD5 hash value specified in this field represents the content in the request. This field can be null. |
Long |
getRequestPacketSize()
Gets the size of the request packets read by the storage service, in bytes. If a request is unsuccessful, this value may be null. |
Date |
getRequestStartTime()
Gets the time in UTC when the request was received by Storage Analytics. |
String |
getRequestStatus()
Gets the status of the requested operation. |
URI |
getRequestUrl()
Gets the complete URL of the request. |
String |
getRequestVersionHeader()
Gets the storage service version specified when the request was made. This is equivalent to the value of the x-ms-version header. |
Long |
getResponseHeaderSize()
Gets the size of the response header, in bytes. If a request is unsuccessful, this value may be null. |
Long |
getResponsePacketSize()
Gets the size of the response packets written by the storage service, in bytes. If a request is unsuccessful, this value may be null. |
Integer |
getServerLatencyInMS()
Gets the total time in milliseconds to perform the requested operation. This value does not include network latency (the time to read the incoming request and send the response to the requester). |
String |
getServerMD5()
Gets the value of the MD5 hash calculated by the storage service as an encoded string. |
String |
getServiceType()
Gets the requested storage service: blob, table, or queue. |
String |
getUserAgentHeader()
Gets the User-Agent header value as an encoded string. |
String |
getVersionNumber()
Gets the version of Storage Analytics Logging used to record the entry. |
void | setAuthenticationType(String authenticationType) |
void | setClientRequestId(String clientRequestId) |
void | setConditionsUsed(String conditionsUsed) |
void | setEndToEndLatencyInMS(Integer endToEndLatencyInMS) |
void | setETagIdentifier(String eTagIdentifier) |
void | setHttpStatusCode(String httpStatusCode) |
void | setLastModifiedTime(Date lastModifiedTime) |
void | setOperationCount(Integer operationCount) |
void | setOperationType(String operationType) |
void | setOwnerAccountName(String ownerAccountName) |
void | setReferrerHeader(String referrerHeader) |
void | setRequestContentLength(Long requestContentLength) |
void | setRequestedObjectKey(String requestedObjectKey) |
void | setRequesterAccountName(String requesterAccountName) |
void | setRequesterIPAddress(String requesterIPAddress) |
void | setRequestHeaderSize(Long requestHeaderSize) |
void | setRequestIdHeader(UUID requestIdHeader) |
void | setRequestMD5(String requestMD5) |
void | setRequestPacketSize(Long requestPacketSize) |
void | setRequestStartTime(Date requestStartTime) |
void | setRequestStatus(String requestStatus) |
void | setRequestUrl(URI requestUrl) |
void | setRequestVersionHeader(String requestVersionHeader) |
void | setResponseHeaderSize(Long responseHeaderSize) |
void | setResponsePacketSize(Long responsePacketSize) |
void | setServerLatencyInMS(Integer serverLatencyInMS) |
void | setServerMD5(String serverMD5) |
void | setServiceType(String serviceType) |
void | setUserAgentHeader(String userAgentHeader) |
void | setVersionNumber(String versionNumber) |
Field Details
LAST_MODIFIED_TIME_FORMAT
protected static final SimpleDateFormat LAST_MODIFIED_TIME_FORMAT= new SimpleDateFormat( "E, dd-MMM-yy HH:mm:ss 'GMT'")
Holds the date format for the LastModifiedTime field.
REQUEST_START_TIME_FORMAT
protected static final SimpleDateFormat REQUEST_START_TIME_FORMAT= new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS'Z'")
Holds the date format for the RequestStartTime field.
Constructor Details
LogRecord
protected LogRecord()
Initializes a new instance of the LogRecord class.
LogRecord
protected LogRecord(LogRecordStreamReader reader)
Initializes a new instance of the LogRecord class using a LogRecordStreamReader to populate.
Parameters:
Throws:
Method Details
getAuthenticationType
public String getAuthenticationType()
Gets whether the request was authenticated, anonymous, or used Shared Access Signature (SAS).
Returns:
String
containing the AuthenticationType valuegetClientRequestId
public String getClientRequestId()
Gets the x-ms-client-request-id header value included in the request.
Returns:
String
containing the ClientRequestId valuegetConditionsUsed
public String getConditionsUsed()
Gets conditions used, as an encoded string semicolon-separated list in the form of ConditionName=value .
Returns:
String
containing the ConditionsUsed valuegetEndToEndLatencyInMS
public Integer getEndToEndLatencyInMS()
Gets the total time in milliseconds to perform the requested operation, including the time to read the incoming request and send the response to the requester.
Returns:
Integer
containing the EndToEndLatencyInMS valuegetETagIdentifier
public String getETagIdentifier()
Gets the ETag identifier for the returned object as an encoded string.
Returns:
String
containing the ETagIdentifier valuegetHttpStatusCode
public String getHttpStatusCode()
Gets the HTTP status code for the request. If the request is interrupted, this value may be set to Unknown.
Returns:
String
containing the HttpStatusCode valuegetLastModifiedTime
public Date getLastModifiedTime()
Gets the Last Modified Time (LMT) for the returned object as an encoded string. This field is null for operations that can return multiple objects.
Returns:
Date
containing the LastModifiedTime valuegetOperationCount
public Integer getOperationCount()
Gets the number of each logged operation for a request, using an index of zero. Some requests require more than one operation, such as Copy Blob, though most perform just one operation.
Returns:
Integer
containing the OperationCount valuegetOperationType
public String getOperationType()
Gets the type of REST operation performed.
Returns:
String
containing the OperationType valuegetOwnerAccountName
public String getOwnerAccountName()
Gets the account name of the service owner.
Returns:
String
containing the OwnerAccountName valuegetReferrerHeader
public String getReferrerHeader()
Gets the Referrer header value as an encoded string.
Returns:
String
containing the ReferrerHeader valuegetRequestContentLength
public Long getRequestContentLength()
Gets the value of the Content-Length header for the request sent to the storage service. If the request was successful, this value is equal to request-packet-size. If a request is unsuccessful, this value may not be equal to request-packet-size, or it may be null.
Returns:
Long
containing the RequestContentLength valuegetRequestedObjectKey
public String getRequestedObjectKey()
Gets the key of the requested object as an encoded string. This field will always use the account name, even if a custom domain name has been configured.
Returns:
String
containing the RequestedObjectKey valuegetRequesterAccountName
public String getRequesterAccountName()
Gets the account name making the request, if the request is authenticated. This field will be null for anonymous and SAS requests.
Returns:
String
containing the RequesterAccountName valuegetRequesterIPAddress
public String getRequesterIPAddress()
Gets the IP address and port of the requester.
Returns:
String
containing the RequesterIPAddress valuegetRequestHeaderSize
public Long getRequestHeaderSize()
Gets the size of the request header, in bytes. If a request is unsuccessful, this value may be null.
Returns:
Long
containing the RequestHeaderSize valuegetRequestIdHeader
public UUID getRequestIdHeader()
Gets the request ID assigned by the storage service. This is equivalent to the value of the x-ms-request-id header.
Returns:
UUID
containing the RequestIdHeader valuegetRequestMD5
public String getRequestMD5()
Gets the value of either the Content-MD5 header or the x-ms-content-md5 header in the request as an encoded string. The MD5 hash value specified in this field represents the content in the request. This field can be null.
Returns:
String
containing the RequestMD5 valuegetRequestPacketSize
public Long getRequestPacketSize()
Gets the size of the request packets read by the storage service, in bytes. If a request is unsuccessful, this value may be null.
Returns:
Long
containing the RequestPacketSize valuegetRequestStartTime
public Date getRequestStartTime()
Gets the time in UTC when the request was received by Storage Analytics.
Returns:
String
containing the RequestStartTime valuegetRequestStatus
public String getRequestStatus()
Gets the status of the requested operation.
Returns:
String
containing the RequestStatus valuegetRequestUrl
public URI getRequestUrl()
Gets the complete URL of the request.
Returns:
URI
containing the RequestUrl valuegetRequestVersionHeader
public String getRequestVersionHeader()
Gets the storage service version specified when the request was made. This is equivalent to the value of the x-ms-version header.
Returns:
String
containing the RequestVersionHeader valuegetResponseHeaderSize
public Long getResponseHeaderSize()
Gets the size of the response header, in bytes. If a request is unsuccessful, this value may be null.
Returns:
Long
containing the ResponseHeaderSize valuegetResponsePacketSize
public Long getResponsePacketSize()
Gets the size of the response packets written by the storage service, in bytes. If a request is unsuccessful, this value may be null.
Returns:
Long
containing the ResponsePacketSize valuegetServerLatencyInMS
public Integer getServerLatencyInMS()
Gets the total time in milliseconds to perform the requested operation. This value does not include network latency (the time to read the incoming request and send the response to the requester).
Returns:
Integer
containing the ServerLatencyInMS valuegetServerMD5
public String getServerMD5()
Gets the value of the MD5 hash calculated by the storage service as an encoded string.
Returns:
String
containing the ServerMD5 valuegetServiceType
public String getServiceType()
Gets the requested storage service: blob, table, or queue.
Returns:
String
containing the ServiceType valuegetUserAgentHeader
public String getUserAgentHeader()
Gets the User-Agent header value as an encoded string.
Returns:
String
containing the UserAgentHeader valuegetVersionNumber
public String getVersionNumber()
Gets the version of Storage Analytics Logging used to record the entry.
Returns:
String
containing the VersionNumber valuesetAuthenticationType
protected void setAuthenticationType(String authenticationType)
Parameters:
setClientRequestId
protected void setClientRequestId(String clientRequestId)
Parameters:
setConditionsUsed
protected void setConditionsUsed(String conditionsUsed)
Parameters:
setEndToEndLatencyInMS
protected void setEndToEndLatencyInMS(Integer endToEndLatencyInMS)
Parameters:
setETagIdentifier
protected void setETagIdentifier(String eTagIdentifier)
Parameters:
setHttpStatusCode
protected void setHttpStatusCode(String httpStatusCode)
Parameters:
setLastModifiedTime
protected void setLastModifiedTime(Date lastModifiedTime)
Parameters:
setOperationCount
protected void setOperationCount(Integer operationCount)
Parameters:
setOperationType
protected void setOperationType(String operationType)
Parameters:
setOwnerAccountName
protected void setOwnerAccountName(String ownerAccountName)
Parameters:
setReferrerHeader
protected void setReferrerHeader(String referrerHeader)
Parameters:
setRequestContentLength
protected void setRequestContentLength(Long requestContentLength)
Parameters:
setRequestedObjectKey
protected void setRequestedObjectKey(String requestedObjectKey)
Parameters:
setRequesterAccountName
protected void setRequesterAccountName(String requesterAccountName)
Parameters:
setRequesterIPAddress
protected void setRequesterIPAddress(String requesterIPAddress)
Parameters:
setRequestHeaderSize
protected void setRequestHeaderSize(Long requestHeaderSize)
Parameters:
setRequestIdHeader
protected void setRequestIdHeader(UUID requestIdHeader)
Parameters:
setRequestMD5
protected void setRequestMD5(String requestMD5)
Parameters:
setRequestPacketSize
protected void setRequestPacketSize(Long requestPacketSize)
Parameters:
setRequestStartTime
protected void setRequestStartTime(Date requestStartTime)
Parameters:
setRequestStatus
protected void setRequestStatus(String requestStatus)
Parameters:
setRequestUrl
protected void setRequestUrl(URI requestUrl)
Parameters:
setRequestVersionHeader
protected void setRequestVersionHeader(String requestVersionHeader)
Parameters:
setResponseHeaderSize
protected void setResponseHeaderSize(Long responseHeaderSize)
Parameters:
setResponsePacketSize
protected void setResponsePacketSize(Long responsePacketSize)
Parameters:
setServerLatencyInMS
protected void setServerLatencyInMS(Integer serverLatencyInMS)
Parameters:
setServerMD5
protected void setServerMD5(String serverMD5)
Parameters:
setServiceType
protected void setServiceType(String serviceType)
Parameters:
setUserAgentHeader
protected void setUserAgentHeader(String userAgentHeader)
Parameters:
setVersionNumber
protected void setVersionNumber(String versionNumber)
Parameters:
Applies to
Azure SDK for Java