API FOR ADVANCED USERS – This class is used with multithreaded applications. It lets you lock an entity once within a thread. More...
#include <ilserver/model.h>
Public Member Functions | |
IlsBoolean | lock () |
IlsBoolean | trylock () |
IlsBoolean | unlock () |
Public Member Functions inherited from IlsEntity | |
IlsEntity (IlsEntity &rhs) | |
Copy constructor. The identifier is copied as well. | |
IlsEntity (IlsIdentifier id, IlsActivity activity=IlsModel::GetDefaultActivity()) | |
virtual | ~IlsEntity () |
Virtual destructor. | |
IlsActivity | getActivity () const |
virtual void | cut (ILS_CUT_DIRECTIVE=ILS_ALL) |
IlsIdentifier | getIdentifier () const |
virtual IlsString | getKeyIdentifier () const |
IlsEntity * | getEntity () |
void | rename (IlsIdentifier) |
void | setEntityContext (IlsEntityContext &) |
void | unsetEntityContext (IlsEntityContext &) |
IlsBoolean | isIdentifierModified () |
During a notification phase, this member function returns IlsTrue if the entity identifier has been modified since the last notification phase. | |
IlsIdentifier | getOldIdentifier () |
During a notification phase, this member function returns the old identifier of the entity. It returns a null smart pointer if the entity has not been modified since the last notification phase. | |
IlsBoolean | remove () |
IlsBoolean | areUsersModified () |
During a notification phase, this function returns IlsTrue if a use relation has been added or removed since the last notification phase. More... | |
void | onRmFromDictionary () |
During a notification phase, this member function returns IlsTrue if the entity identifier has been modified since the last notification phase. | |
void | removeFromDictionaries () |
During a notification phase, this member function returns IlsTrue if the entity identifier has been modified since the last notification phase. | |
virtual IlsBoolean | isUpdateAllowed () |
By default, this virtual member function returns IlsFalse when the entity is locked and IlsTrue if you have the right to modify the entity. It is called if the static member function IlsModel::SetUpdateChecked() returns IlsTrue . | |
API FOR ADVANCED USERS – This class is used with multithreaded applications. It lets you lock an entity once within a thread.
Library: server
This type of lock is riskier than the type of lock defined using IlsSafelyLockableEntity
but offers better performance.
IlsSafelyLockableEntity
, IlsThread
.
|
virtual |
\short Locks the entity.
If the entity is locked by another thread, it will wait until the lock can be taken. The member function returns IlsFalse
if the operation fails.
An entity cannot be locked several times by the same thread.
Reimplemented from IlsEntity.
|
virtual |
|
virtual |
\short Unlocks the entity.
An entity can be unlocked:
This function returns IlsFalse
if an error occurs.
Reimplemented from IlsEntity.