Package jadex.bridge.service.types.cms
Class LockEntry
- java.lang.Object
-
- jadex.bridge.service.types.cms.LockEntry
-
public class LockEntry extends java.lang.Object
Entry that represents a lock for a component. Is used to lock the parent while a child is created.
-
-
Field Summary
Fields Modifier and Type Field Description protected Future<java.util.Map<java.lang.String,java.lang.Object>>
killfuture
The kill flag.protected IComponentIdentifier
locked
The locked component.protected java.util.Set<java.lang.String>
lockers
The components that have a lock.
-
Constructor Summary
Constructors Constructor Description LockEntry(IComponentIdentifier locked)
Create a new lock entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocker(java.lang.String locker)
Add a locker id.Future<java.util.Map<java.lang.String,java.lang.Object>>
getKillFuture()
Get the killfuture.IComponentIdentifier
getLocked()
int
getLockerCount()
Get the locker count.boolean
removeLocker(java.lang.String locker)
Remove a locker id.void
setKillFuture(Future<java.util.Map<java.lang.String,java.lang.Object>> killfuture)
Set the killfuture.
-
-
-
Field Detail
-
locked
protected IComponentIdentifier locked
The locked component.
-
lockers
protected java.util.Set<java.lang.String> lockers
The components that have a lock.
-
killfuture
protected Future<java.util.Map<java.lang.String,java.lang.Object>> killfuture
The kill flag.
-
-
Constructor Detail
-
LockEntry
public LockEntry(IComponentIdentifier locked)
Create a new lock entry.
-
-
Method Detail
-
addLocker
public void addLocker(java.lang.String locker)
Add a locker id.- Parameters:
locker
- The locker id.
-
removeLocker
public boolean removeLocker(java.lang.String locker)
Remove a locker id.- Parameters:
locker
- The locker id.- Returns:
- True, if it was last lock and the component needs to be killed.
-
getLockerCount
public int getLockerCount()
Get the locker count.- Returns:
- The number of lockers.
-
getKillFuture
public Future<java.util.Map<java.lang.String,java.lang.Object>> getKillFuture()
Get the killfuture.- Returns:
- the killfuture.
-
setKillFuture
public void setKillFuture(Future<java.util.Map<java.lang.String,java.lang.Object>> killfuture)
Set the killfuture.- Parameters:
killfuture
- The killfuture to set.
-
getLocked
public IComponentIdentifier getLocked()
- Returns:
- the locked
-
-