Library: Data
Package: Logging
Header: Poco/Data/ArchiveStrategy.h
The ArchiveStrategy is used by SQLChannel to archive log rows.
Known Derived Classes: ArchiveByAgeStrategy
Member Functions: archive, getCopyStatement, getCountStatement, getDeleteStatement, getDestination, getSource, getThreshold, open, session, setCopyStatement, setCountStatement, setDeleteStatement, setDestination, setSource, setThreshold
typedef Poco::SharedPtr < Session > SessionPtr;
typedef Poco::SharedPtr < Statement > StatementPtr;
ArchiveStrategy(
const std::string & connector,
const std::string & connect,
const std::string & source,
const std::string & destination = DEFAULT_ARCHIVE_DESTINATION
);
Creates archive strategy.
virtual ~ArchiveStrategy();
Destroys archive strategy.
virtual void archive() = 0;
Archives the rows.
const std::string & getDestination() const;
Returns the name of the destination table for rows to be archived.
const std::string & getSource() const;
Returns the name of the source table containing rows to be archived.
virtual const std::string & getThreshold() const = 0;
Returns the archive threshold.
void open();
Opens the session.
void setDestination(
const std::string & destination
);
Sets the name of the destination table.
void setSource(
const std::string & source
);
Sets the name of the source table.
virtual void setThreshold(
const std::string & threshold
) = 0;
Sets the archive threshold.
Statement & getCopyStatement();
Statement & getCountStatement();
Statement & getDeleteStatement();
Session & session();
void setCopyStatement();
void setCountStatement();
void setDeleteStatement();
static const std::string DEFAULT_ARCHIVE_DESTINATION;