26#include <shared_mutex>
30#include <MemoryX/interface/core/MemoryInterface.h>
32#define MEMORYX_TOKEN(lock) \
35 "token", lock->token \
50 void unlock(
const Ice::Current&
c = Ice::emptyCurrent)
override;
73 std::string
getJSONEntityById(
const std::string&
id,
const Ice::Current&)
const override;
76 bool includeMetaEntities,
77 const Ice::Current&
c = Ice::emptyCurrent)
const override;
80 bool includeMetaEntities,
81 const Ice::Current&
c = Ice::emptyCurrent)
const override;
83 SegmentLockBasePtr
lockSegment(
const Ice::Current&
c)
override;
84 bool keepLockAlive(
const std::string& token,
const Ice::Current&)
override;
85 bool unlockSegment(
const SegmentLockBasePtr& lock,
const Ice::Current&
c)
override;
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
armarx::PeriodicTask< SegmentLock >::pointer_type keepAliveTask
void ice_postUnmarshal() override
void unlock(const Ice::Current &c=Ice::emptyCurrent) override
SegmentLock(bool start_watchdog=false)
std::unique_lock< std::shared_mutex > ScopedUniqueLock
std::string getJSONEntityById(const std::string &id, const Ice::Current &) const override
SegmentUtilImplementations()
ScopedSharedLockPtr readLock
bool unlockSegmentWithToken(const std::string &token, const Ice::Current &c) override
std::unique_ptr< ScopedSharedLock > ScopedSharedLockPtr
bool unlockSegment(const SegmentLockBasePtr &lock, const Ice::Current &c) override
ScopedUniqueLockPtr writeLock
EntityBaseList getEntityWithChildrenByName(const std::string &, bool includeMetaEntities, const Ice::Current &c=Ice::emptyCurrent) const override
EntityMemorySegmentInterfacePrx selfProxy
std::shared_mutex segmentMutex
IceUtil::Time keepAliveTimestamp
ScopedSharedLockPtr getReadLock(const Ice::Current &c) const
ScopedUniqueLockPtr getWriteLock(const Ice::Current &c) const
std::unique_lock< std::shared_mutex > ScopedSharedLock
bool keepLockAlive(const std::string &token, const Ice::Current &) override
std::mutex keepAliveTimestampMutex
armarx::PeriodicTask< SegmentUtilImplementations >::pointer_type keepAliveCheckTask
std::unique_ptr< ScopedSharedLock > ScopedUniqueLockPtr
EntityBaseList getEntityWithChildrenById(const std::string &id, bool includeMetaEntities, const Ice::Current &c=Ice::emptyCurrent) const override
SegmentLockBasePtr lockSegment(const Ice::Current &c) override