| 1 |
/* |
| 2 |
* Copyright (C) 2013-2015, 2019 by the Konclude Developer Team. |
| 3 |
* |
| 4 |
* This file is part of the reasoning system Konclude. |
| 5 |
* For details and support, see <http://konclude.com/>. |
| 6 |
* |
| 7 |
* Konclude is free software: you can redistribute it and/or modify |
| 8 |
* it under the terms of version 3 of the GNU Lesser General Public |
| 9 |
* License (LGPLv3) as published by the Free Software Foundation. |
| 10 |
* |
| 11 |
* Konclude is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
* GNU (Lesser) General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU (Lesser) General Public |
| 17 |
* License along with Konclude. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
* |
| 19 |
*/ |
| 20 |
|
| 21 |
#ifndef KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDINDIVIDUALRETRIEVALCOMPUTATIONUPDATECOORDINATIONHASH_H |
| 22 |
#define KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDINDIVIDUALRETRIEVALCOMPUTATIONUPDATECOORDINATIONHASH_H |
| 23 |
|
| 24 |
// Libraries includes |
| 25 |
#include <QHash> |
| 26 |
|
| 27 |
// Namespace includes |
| 28 |
#include "CacheSettings.h" |
| 29 |
#include "CBackendIndividualRetrievalComputationUpdateCoordinationHashData.h" |
| 30 |
|
| 31 |
// Other includes |
| 32 |
|
| 33 |
|
| 34 |
// Logger includes |
| 35 |
#include "Logger/CLogger.h" |
| 36 |
|
| 37 |
|
| 38 |
namespace Konclude { |
| 39 |
|
| 40 |
namespace Reasoner { |
| 41 |
|
| 42 |
namespace Kernel { |
| 43 |
|
| 44 |
namespace Cache { |
| 45 |
|
| 46 |
|
| 47 |
/*! |
| 48 |
* |
| 49 |
* \class CBackendIndividualRetrievalComputationUpdateCoordinationHash |
| 50 |
* \author Andreas Steigmiller |
| 51 |
* \version 0.1 |
| 52 |
* \brief TODO |
| 53 |
* |
| 54 |
*/ |
| 55 |
class CBackendIndividualRetrievalComputationUpdateCoordinationHash : public QMap<cint64, CBackendIndividualRetrievalComputationUpdateCoordinationHashData*> { |
| 56 |
// public methods |
| 57 |
public: |
| 58 |
//! Constructor |
| 59 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash(); |
| 60 |
|
| 61 |
cint64 getApproximateRemainingIncompletelyHandledCount(); |
| 62 |
|
| 63 |
|
| 64 |
cint64 getHashRemainingCount(); |
| 65 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incHashRemainingCount(cint64 count = 1); |
| 66 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decHashRemainingCount(cint64 count = 1); |
| 67 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setHashRemainingCount(cint64 count); |
| 68 |
|
| 69 |
|
| 70 |
cint64 getHashRemovedCount(); |
| 71 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incHashRemovedCount(cint64 count = 1); |
| 72 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decHashRemovedCount(cint64 count = 1); |
| 73 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setHashRemovedCount(cint64 count); |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
cint64 getApproximateCorrectionIncompletelyHandledCount(); |
| 78 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incApproximateCorrectionIncompletelyHandledCount(cint64 count = 1); |
| 79 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decApproximateCorrectionIncompletelyHandledCount(cint64 count = 1); |
| 80 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setApproximateCorrectionIncompletelyHandledCount(cint64 count); |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
cint64 getApproximateTotalIncompletelyHandledCount(); |
| 85 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incApproximateTotalIncompletelyHandledCount(cint64 count = 1); |
| 86 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decApproximateTotalIncompletelyHandledCount(cint64 count = 1); |
| 87 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setApproximateTotalIncompletelyHandledCount(cint64 count); |
| 88 |
|
| 89 |
|
| 90 |
cint64 getHashProcessedCount(); |
| 91 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incHashProcessedCount(cint64 count = 1); |
| 92 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decHashProcessedCount(cint64 count = 1); |
| 93 |
|
| 94 |
|
| 95 |
cint64 getHashComputationCount(); |
| 96 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incHashComputationCount(cint64 count = 1); |
| 97 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decHashComputationCount(cint64 count = 1); |
| 98 |
|
| 99 |
CBackendIndividualRetrievalComputationUpdateCoordinationHashData* createCoordinationData(); |
| 100 |
|
| 101 |
|
| 102 |
cint64 getUsageCount(); |
| 103 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* incUsageCount(cint64 count = 1); |
| 104 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* decUsageCount(cint64 count = 1); |
| 105 |
|
| 106 |
|
| 107 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setBasicPrecomputationMode(bool basicMode); |
| 108 |
bool hasBasicPrecomputationMode(); |
| 109 |
|
| 110 |
|
| 111 |
CBackendIndividualRetrievalComputationUpdateCoordinationHash* setBasicPrecomputationFinished(bool basicModeFinished); |
| 112 |
bool hasBasicPrecomputationFinished(); |
| 113 |
|
| 114 |
// protected methods |
| 115 |
protected: |
| 116 |
|
| 117 |
// protected variables |
| 118 |
protected: |
| 119 |
|
| 120 |
|
| 121 |
cint64 mCorrectionIncompletelyHandledCount; |
| 122 |
cint64 mTotalIncompletelyHandledCount; |
| 123 |
cint64 mHashProcessedCount; |
| 124 |
cint64 mHashComputationCount; |
| 125 |
cint64 mHashRemainingCount; |
| 126 |
|
| 127 |
cint64 mHashRemovedCount; |
| 128 |
|
| 129 |
|
| 130 |
cint64 mUsageCount; |
| 131 |
|
| 132 |
|
| 133 |
bool mBasicPrecomputationMode; |
| 134 |
bool mBasicPrecomputationFinished; |
| 135 |
|
| 136 |
|
| 137 |
// private methods |
| 138 |
private: |
| 139 |
|
| 140 |
// private variables |
| 141 |
private: |
| 142 |
|
| 143 |
|
| 144 |
}; |
| 145 |
|
| 146 |
}; // end namespace Cache |
| 147 |
|
| 148 |
}; // end namespace Kernel |
| 149 |
|
| 150 |
}; // end namespace Reasoner |
| 151 |
|
| 152 |
}; // end namespace Konclude |
| 153 |
|
| 154 |
#endif // KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDINDIVIDUALRETRIEVALCOMPUTATIONUPDATECOORDINATIONHASH_H |