// caso se ha reusado.
//------------------------------------------------------------------------------------------------
Object* StorageArea::instance(Connection* connection, Loader& loader)
-throw(RuntimeException, DatabaseException) {
+noexcept(false) {
const Index index = loader.getIndex();
Object* result(NULL);
Instance* instance(NULL);
}
Object* StorageArea::instance(Connection* connection, CrossedLoader& crossedLoader, Loader& loader)
-throw(RuntimeException, DatabaseException) {
+noexcept(false) {
Object* result = NULL;
crossedLoader.a_connection = connection;
// Si el seek devuelve 'true' es que ya tiene cargada la correspondencia entre la clave alternativa y la
// Crea un nuevo objeto en el area de almacenamiento.
//-------------------------------------------------------------------------
Object* StorageArea::create(Connection* connection, Creator& creator)
-throw(RuntimeException, DatabaseException) {
+noexcept(false) {
const Index index = creator.getIndex();
Instance* instance = NULL;
Object* result = NULL;
// lo sacamos de ah�
//-------------------------------------------------------------------------
Object* StorageArea::find(Loader& loader)
-throw(RuntimeException) {
+noexcept(false) {
const Index index = loader.getIndex();
Instance* instance = NULL;
Object* result = NULL;
}
Object* StorageArea::duplicate(const Object* object)
-throw(RuntimeException) {
+noexcept(false) {
if(object == NULL) return NULL;
std::string name("dbos::StorageArea::duplicate with ");
}
bool StorageArea::isLoaded(const Loader& loader)
-throw(RuntimeException) {
+noexcept(false) {
const Index index = loader.getIndex();
std::string name("dbos::StorageArea::isLoaded with ");
name += typeid(loader).name();
}
void StorageArea::apply(Connection& connection, Recorder& recorder)
-throw(RuntimeException, DatabaseException) {
+noexcept(false) {
ResultCode resultCode = connection.execute(recorder.getStatement());
if(resultCode.successful() == false)
// instancia en cuanto pueda.
//------------------------------------------------------------------------------------------------
void StorageArea::apply(Connection& connection, Eraser& eraser)
-throw(RuntimeException, DatabaseException) {
+noexcept(false) {
if(a_accessMode == AccessMode::ReadOnly) {
string msg(asString());
msg += " | Cannot erase object with AccessMode::ReadOnly";
// memoria alcance un numero tal que implique comenzar a reusar objetos liberados.
//------------------------------------------------------------------------------------------------
void StorageArea::release(Object** object)
-throw(RuntimeException) {
+noexcept(false) {
if(object == NULL) return;
if(*object == NULL) return;
// si fuera necesario invocara al 'destroy'.
//------------------------------------------------------------------------------------------------
void StorageArea::erase(Object** object)
-throw(RuntimeException) {
+noexcept(false) {
if(object == NULL) return;
if(*object == NULL) return;
}
void StorageArea::dirty(Object* object)
-throw(RuntimeException) {
+noexcept(false) {
if(object == NULL) return;
std::string name("dbos::StorageArea::dirty with ");
// expulsarla de cache.
//--------------------------------------------------------------------------------------------
void StorageArea::clear()
-throw(RuntimeException) {
+noexcept(false) {
Guard guard(this, "dbos::StorageArea::clear");
Instance* instance;
int n = 0;
// y se libera su memoria.
//---------------------------------------------------------------------------------------------------
Object* StorageArea::reload(dbms::Connection* connection, Loader& loader, StorageArea::Instance* instance)
-throw(RuntimeException, dbms::DatabaseException) {
+noexcept(false) {
const bool enableUpdate = (instance->flags & Flag::Dirty) ? true : instance->object->enableUpdate();
bool hasChanges(false);
// a instanciar, etc, etc
//------------------------------------------------------------------------------------------------
void StorageArea::checkIncoherence(StorageArea::Instance* instance)
-throw() {
+{
if(quickReusing(instance) == true) {
LOGWARNING(
string msg("dbos::StorageArea::checkIncoherence | ");
// esta, cambiarle el msHoleTime y volverlo a grabar.
//------------------------------------------------------------------------------------------------
bool StorageArea::quickReusing(StorageArea::Instance* instance)
-throw() {
+{
bool result(false);
if(a_holes.insert(instance, Holes::Mode::ReadyToReuse) == true) { // (1)
}
void StorageArea::verifyStatus(StorageArea::Instance* instance, const bool ignoreDirty)
-throw(RuntimeException) {
+noexcept(false) {
if(instance->flags & Flag::Incoherent) {
string msg(asString());
msg += " | ";
}
string StorageArea::asString() const
-throw() {
+{
string result("dbos::StorageArea { Name: ");
const int ratio = (a_hit == 0) ? 0 : (a_hit * 100) / (a_fault + a_hit);
/* Nº real de objetos en uso. En el directorio también se mantienen los que tienen la cuenta de utilización a 0 */
}
xml::Node* StorageArea::asXML(xml::Node* parent) const
-throw() {
+{
xml::Node* result = parent->createChild("dbos.StorageArea");
xml::Node* node;
const int ratio = (a_hit == 0) ? 0 : (a_hit * 100) / (a_fault + a_hit);
}
string StorageArea::asMemorySize(const Size size)
-throw() {
+{
string result;
if(size < 1024) {
}
StorageArea::Instance* StorageArea::allocate()
-throw() {
+{
Instance* result = NULL;
if((result = reuse()) == NULL) {
// (2) Si el primero de los registros disponibles no es suficientemente antiguo => no hay huecos libres
//-----------------------------------------------------------------------------------------------------
StorageArea::Instance* StorageArea::reuse()
-throw() {
+{
if(a_holes.empty() == true)
return NULL;
}
std::string StorageArea::asString(const Instance* instance)
-throw() {
+{
std::string result("Instance { ");
if(instance == NULL)
}
const char* StorageArea::AccessMode::asString(const AccessMode::_v v)
-throw() {
+{
static const char* text [] = { "ReadOnly", "ReadWrite", "ReadEver" };
return text [v];
}
}
bool StorageArea::Holes::insert(Instance* instance, const StorageArea::Holes::Mode::_v mode)
-throw() {
+{
if(instance->copyCounter > 0)
return false;
}
void StorageArea::Holes::erase(Instance* instance)
-throw() {
+{
// instance->msHoleTime = 0;
instance->flags |= Flag::Ready;