public class PageAccessSynchronizer extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
PageAccessSynchronizer.PageLock
Thread's lock on a page
|
Constructor and Description |
---|
PageAccessSynchronizer(Duration timeout)
Constructor
|
Modifier and Type | Method and Description |
---|---|
IPageManager |
adapt(IPageManager pagemanager)
Wraps a page manager with this synchronizer
|
Duration |
getTimeout(int pageId) |
void |
lockPage(int pageId)
Acquire a lock to a page
|
void |
unlockAllPages()
Unlocks all pages locked by this thread
|
void |
unlockPage(int pageId)
Unlocks a single page locked by the current thread.
|
public PageAccessSynchronizer(Duration timeout)
timeout
- timeout value for acquiring a page lockpublic Duration getTimeout(int pageId)
pageId
- the id of the page to be lockedpublic void lockPage(int pageId) throws CouldNotLockPageException
pageId
- page idCouldNotLockPageException
- if lock could not be acquiredpublic void unlockAllPages()
public void unlockPage(int pageId)
pageId
- the id of the page which should be unlocked.public IPageManager adapt(IPageManager pagemanager)
pagemanager
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.