T
- The type of the Record
instances managed by the
Logger
.Flushable
, org.refcodes.component.Component
, org.refcodes.component.Decomposeable
, org.refcodes.component.Destroyable
, org.refcodes.component.Flushable
, org.refcodes.component.Initializable
, org.refcodes.logger.Logger<T>
, org.refcodes.logger.QueryLogger<T>
, org.refcodes.logger.TrimLogger<T>
, org.refcodes.structure.Clearable
public class SimpleDbTrimLoggerImpl<T> extends SimpleDbQueryLoggerImpl<T> implements org.refcodes.logger.TrimLogger<T>, org.refcodes.component.Component, org.refcodes.component.Initializable, org.refcodes.component.Decomposeable, org.refcodes.component.Flushable
SimpleDbTrimLoggerImpl
extends the
SimpleDbQueryLoggerImpl
implementation with the TrimLogger
functionality.org.refcodes.component.Decomposeable.DecomposeAutomaton
org.refcodes.component.Destroyable.DestroyAutomaton
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>
org.refcodes.component.Initializable.InitializeAutomaton, org.refcodes.component.Initializable.InitializeBuilder<B extends org.refcodes.component.Initializable.InitializeBuilder<B>>, org.refcodes.component.Initializable.UncheckedInitializable
SimpleDbQueryLoggerImpl.SimpleDbRecordsImpl
LOGGER
Constructor | Description |
---|---|
SimpleDbTrimLoggerImpl(String aDomainName,
String aAccessKey,
String aSecretKey,
String aEndPoint,
org.refcodes.tabular.ColumnFactory<T> aColumnFactory) |
Instantiates a new simple db trim logger impl.
|
SimpleDbTrimLoggerImpl(String aDomainName,
String aAccessKey,
String aSecretKey,
org.refcodes.tabular.ColumnFactory<T> aColumnFactory) |
Instantiates a new simple db trim logger impl.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
|
protected static void |
clearDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient,
String aDomainName) |
Clears all content from the given Amazon SimpleDB domain.
|
void |
deleteLogs(org.refcodes.criteria.Criteria aCriteria) |
|
protected com.amazonaws.services.simpledb.AmazonSimpleDBClient |
getAmazonSimpleDbClient() |
Retrieves the amazon SimpleDB client to be used.
|
protected static com.amazonaws.services.simpledb.AmazonSimpleDBClient |
getAmazonSimpleDbClient(File aConfigFile) |
Retrieves an
AmazonSimpleDBClient from a configuration file
containing the access- and the secret key. |
protected String |
getAmazonSimpleDbDomainName() |
Retrieves the domain name to be used.
|
protected static List<String> |
getDomainNames(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient) |
Retrieves a list of domain names retrievable from the given
AmazonSimpleDBClient . |
protected static boolean |
hasDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient,
String aDomainName) |
Tests whether the given domain exists in Amazon SimpleDB.
|
protected static boolean |
isRequestTimeoutException(Exception aException) |
Checks if is request timeout exception.
|
protected static boolean |
isServiceUnavailableException(Exception aException) |
Checks if is service unavailable exception.
|
protected void |
setAmazonSimpleDbDomainName(String aAmazonSimpleDbDomainName) |
Sets the domain name to be used.
|
protected static String |
toMessage(Throwable aThrowable) |
Creates an Amazon AWS specific exception message from the given throwable
containing additional information such as the AWS error code, the AWS
error type, the request ID, the service name and the status code.
|
flush, flushUnchecked, isFlushable
initialize, initializeUnchecked
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findLogs, findLogs, findLogs, findLogs, findLogs, findLogs, findLogs
addHeaderColumn, decompose, flush, flushBuffer, getHeader, initialize, log
destroy, findLogs, findLogs, findLogs, findLogs, findLogs, findLogs, findLogs, toSqlQuery
public SimpleDbTrimLoggerImpl(String aDomainName, String aAccessKey, String aSecretKey, org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
aDomainName
- the domain nameaAccessKey
- the access keyaSecretKey
- the secret keyaColumnFactory
- the column factorypublic SimpleDbTrimLoggerImpl(String aDomainName, String aAccessKey, String aSecretKey, String aEndPoint, org.refcodes.tabular.ColumnFactory<T> aColumnFactory)
aDomainName
- the domain nameaAccessKey
- the access keyaSecretKey
- the secret keyaEndPoint
- the end pointaColumnFactory
- the column factorypublic void deleteLogs(org.refcodes.criteria.Criteria aCriteria)
deleteLogs
in interface org.refcodes.logger.TrimLogger<T>
public void clear()
clear
in interface org.refcodes.structure.Clearable
protected String getAmazonSimpleDbDomainName()
protected void setAmazonSimpleDbDomainName(String aAmazonSimpleDbDomainName)
aAmazonSimpleDbDomainName
- the new amazon simple db domain nameprotected com.amazonaws.services.simpledb.AmazonSimpleDBClient getAmazonSimpleDbClient()
protected static boolean isRequestTimeoutException(Exception aException)
aException
- the exceptionprotected static boolean isServiceUnavailableException(Exception aException)
aException
- the exceptionprotected static String toMessage(Throwable aThrowable)
aThrowable
- The throwable from which to generate the Amazon AWS
specific exception message.protected static void clearDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient, String aDomainName)
aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.aDomainName
- The domain name of the domain to be cleared.protected static com.amazonaws.services.simpledb.AmazonSimpleDBClient getAmazonSimpleDbClient(File aConfigFile) throws IOException
AmazonSimpleDBClient
from a configuration file
containing the access- and the secret key.aConfigFile
- The configuration file used to configure the
AmazonSimpleDBClient
.AmazonSimpleDBClient
.IOException
- In case there were problems reading the configuration
file.protected static List<String> getDomainNames(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient)
AmazonSimpleDBClient
.aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.String
instances representing the
retrievable domain names.protected static boolean hasDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient, String aDomainName)
aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.aDomainName
- The domain name to be tested.Copyright © 2018. All rights reserved.