Package org.apache.wicket.page
Class DefaultPageLockManager
- java.lang.Object
-
- org.apache.wicket.page.DefaultPageLockManager
-
- All Implemented Interfaces:
Serializable
,IPageLockManager
public class DefaultPageLockManager extends Object implements IPageLockManager
DefaultIPageLockManager
that holds a map of locks in the current session.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultPageLockManager(Duration timeout)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getTimeout(int pageId)
void
lockPage(int pageId)
Acquire a lock to a pagevoid
unlockAllPages()
Unlocks all pages locked by this threadvoid
unlockPage(int pageId)
Unlocks a single page locked by the current thread.
-
-
-
Constructor Detail
-
DefaultPageLockManager
public DefaultPageLockManager(Duration timeout)
Constructor- Parameters:
timeout
- timeout value for acquiring a page lock
-
-
Method Detail
-
getTimeout
public Duration getTimeout(int pageId)
- Parameters:
pageId
- the id of the page to be locked- Returns:
- the duration for acquiring a page lock
-
lockPage
public void lockPage(int pageId) throws CouldNotLockPageException
Description copied from interface:IPageLockManager
Acquire a lock to a page- Specified by:
lockPage
in interfaceIPageLockManager
- Parameters:
pageId
- page id- Throws:
CouldNotLockPageException
- if lock could not be acquired
-
unlockAllPages
public void unlockAllPages()
Description copied from interface:IPageLockManager
Unlocks all pages locked by this thread- Specified by:
unlockAllPages
in interfaceIPageLockManager
-
unlockPage
public void unlockPage(int pageId)
Description copied from interface:IPageLockManager
Unlocks a single page locked by the current thread.- Specified by:
unlockPage
in interfaceIPageLockManager
- Parameters:
pageId
- the id of the page which should be unlocked.
-
-