Implement a better data structure to store policies 21/25221/4
authorAleksander Zdyb <a.zdyb@partner.samsung.com>
Thu, 31 Jul 2014 13:01:13 +0000 (15:01 +0200)
committerAleksander Zdyb <a.zdyb@partner.samsung.com>
Thu, 31 Jul 2014 13:01:13 +0000 (15:01 +0200)
commit938defaf19d30419de088631bd2a25f0b78d677e
tree4301ebb5f8c7e786a59be377f14bd2bd64a90885
parent3f6c825b3e9a0e69034ce4a608d6407075963f6e
Implement a better data structure to store policies

A new map-based structure was used to store policies
in Cynara::PolicyBucket. This allows policy checks
to be much faster.

PolicyBucket interface was changed, so the operation
required a lot of refactorings across many storage classes.
Most of functions are now simpler, clearer and decoupled
from each other. Tests has been adjusted. No public API changes
were required.

Change-Id: Ida9dc8eb31120b27cf9547e56840dd27390de247
20 files changed:
src/common/CMakeLists.txt
src/common/types/PolicyBucket.cpp
src/common/types/PolicyBucket.h
src/common/types/PolicyCollection.h
src/service/storage/InMemoryStorageBackend.cpp
src/service/storage/Storage.cpp
src/service/storage/StorageDeserializer.cpp
src/service/storage/StorageSerializer.cpp
test/CMakeLists.txt
test/common/types/policybucket.cpp
test/helpers.h
test/storage/inmemorystoragebackend/buckets.cpp
test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
test/storage/inmemorystoragebackend/search.cpp
test/storage/serializer/deserialize.cpp
test/storage/serializer/dump.cpp
test/storage/serializer/dump_load.cpp
test/storage/storage/check.cpp
test/storage/storage/policies.cpp