public class CloudAnalyticsClient extends Object
The service client encapsulates the endpoint or endpoints for the blob and table service. It also encapsulates the credentials for accessing the storage account.
Modifier and Type | Field and Description |
---|---|
protected CloudBlobClient |
blobClient
The blob client for logging features.
|
protected String |
LogContainer
The container in which to look for logs.
|
protected CloudTableClient |
tableClient
The table client for metrics features.
|
Constructor and Description |
---|
CloudAnalyticsClient(StorageUri blobStorageUri,
StorageUri tableStorageUri,
StorageCredentials credentials)
Initializes a new instance of the
CloudAnalyticsClient class using the specified blob and table
service endpoints and account credentials. |
Modifier and Type | Method and Description |
---|---|
CloudTable |
getCapacityTable()
Gets the capacity metrics table for the blob service.
|
CloudTable |
getHourMetricsTable(StorageService service)
Gets the hour metrics table for a specific storage service.
|
CloudTable |
getHourMetricsTable(StorageService service,
StorageLocation location)
Gets the hour metrics table for a specific storage service.
|
CloudBlobDirectory |
getLogDirectory(StorageService service)
Gets the
CloudBlobDirectory object for the logs for a specific storage service. |
CloudTable |
getMinuteMetricsTable(StorageService service)
Gets the minute metrics table for a specific storage service.
|
CloudTable |
getMinuteMetricsTable(StorageService service,
StorageLocation location)
Gets the minute metrics table for a specific storage service.
|
Iterable<ListBlobItem> |
listLogBlobs(StorageService service)
Returns an enumerable collection of log blobs, retrieved lazily.
|
Iterable<ListBlobItem> |
listLogBlobs(StorageService service,
Date startTime,
Date endTime,
EnumSet<LoggingOperations> operations,
BlobListingDetails details,
BlobRequestOptions options,
OperationContext operationContext)
Returns an enumerable collection of log blobs, retrieved lazily.
|
Iterable<LogRecord> |
listLogRecords(StorageService service)
Returns an enumerable collection of log records, retrieved lazily.
|
Iterable<LogRecord> |
listLogRecords(StorageService service,
Date startTime,
Date endTime,
BlobRequestOptions options,
OperationContext operationContext)
Returns an enumerable collection of log records, retrieved lazily.
|
static Iterable<LogRecord> |
parseLogBlob(ListBlobItem logBlob)
Returns an enumerable collection of log records, retrieved lazily.
|
static Iterable<LogRecord> |
parseLogBlobs(Iterable<ListBlobItem> logBlobs)
Returns an enumerable collection of log records, retrieved lazily.
|
protected final CloudBlobClient blobClient
protected final CloudTableClient tableClient
protected String LogContainer
public CloudAnalyticsClient(StorageUri blobStorageUri, StorageUri tableStorageUri, StorageCredentials credentials)
CloudAnalyticsClient
class using the specified blob and table
service endpoints and account credentials.blobStorageUri
- A StorageUri
object containing the Blob service endpoint to use to create the client.tableStorageUri
- A StorageUri
object containing the Table service endpoint to use to create the client.credentials
- A StorageCredentials
object.public CloudBlobDirectory getLogDirectory(StorageService service) throws URISyntaxException, StorageException
CloudBlobDirectory
object for the logs for a specific storage service.service
- A StorageService
enumeration value that indicates which storage service to use.CloudBlobDirectory
object.URISyntaxException
StorageException
public CloudTable getHourMetricsTable(StorageService service) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.CloudTable
object for the storage service.URISyntaxException
StorageException
public CloudTable getHourMetricsTable(StorageService service, StorageLocation location) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.location
- A StorageLocation
enumeration value that indicates which storage location to use.CloudTable
object for the storage service.URISyntaxException
StorageException
public CloudTable getMinuteMetricsTable(StorageService service) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.CloudTable
object for the storage service.URISyntaxException
StorageException
public CloudTable getMinuteMetricsTable(StorageService service, StorageLocation location) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.location
- A StorageLocation
enumeration value that indicates which storage location to use.CloudTable
object for the storage service.URISyntaxException
StorageException
public CloudTable getCapacityTable() throws URISyntaxException, StorageException
CloudTable
object.URISyntaxException
StorageException
public Iterable<ListBlobItem> listLogBlobs(StorageService service) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.ListBlobItem
and are retrieved lazily.URISyntaxException
StorageException
public Iterable<ListBlobItem> listLogBlobs(StorageService service, Date startTime, Date endTime, EnumSet<LoggingOperations> operations, BlobListingDetails details, BlobRequestOptions options, OperationContext operationContext) throws StorageException, URISyntaxException
service
- A StorageService
enumeration value that indicates which storage service to use.startTime
- A java.util.Date
object representing the start of the time range for which logs should
be retrieved.endTime
- A java.util.Date
object representing the end of the time range for which logs should
be retrieved.operations
- A LoggingOperations
enumeration set that indicates which log types to return.details
- A BlobListingDetails
enumeration set that indicates whether or not blob metadata should
be returned. None or METADATA are the only valid values.options
- A BlobRequestOptions
object that specifies additional options for the request.operationContext
- An OperationContext
object that represents the context for the current operation.ListBlobItem
and are retrieved lazily.StorageException
URISyntaxException
public Iterable<LogRecord> listLogRecords(StorageService service) throws URISyntaxException, StorageException
service
- A StorageService
enumeration value that indicates which storage service to use.ListBlobItem
and are retrieved lazily.URISyntaxException
StorageException
public Iterable<LogRecord> listLogRecords(StorageService service, Date startTime, Date endTime, BlobRequestOptions options, OperationContext operationContext) throws StorageException, URISyntaxException
service
- A StorageService
enumeration value that indicates which storage service to use.startTime
- A java.util.Date
object representing the start of the time range for which logs should
be retrieved.endTime
- A java.util.Date
object representing the end of the time range for which logs should
be retrieved.options
- A BlobRequestOptions
object that specifies additional options for the request.operationContext
- An OperationContext
object that represents the context for the current operation.ListBlobItem
and are retrieved lazily.StorageException
URISyntaxException
public static Iterable<LogRecord> parseLogBlobs(Iterable<ListBlobItem> logBlobs)
logBlobs
- An Iterable
of blobs to parse LogRecords from.LogRecords
and are retrieved lazily.StorageException
URISyntaxException
public static Iterable<LogRecord> parseLogBlob(ListBlobItem logBlob)
logBlobs
- An Iterable
of blobs to parse LogRecords from.LogRecords
and are retrieved lazily.StorageException
URISyntaxException
Copyright © 2019. All rights reserved.