public class LockManagerService extends DefaultComponent
Actual instantiation is done by storage backends.
Modifier and Type | Class and Description |
---|---|
protected static class |
LockManagerService.LockManagerDescriptorRegistry |
Modifier and Type | Field and Description |
---|---|
protected Map<String,LockManager> |
lockManagers |
protected LockManagerService.LockManagerDescriptorRegistry |
registry |
lastModified
Constructor and Description |
---|
LockManagerService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
protected void |
addContribution(LockManagerDescriptor descriptor) |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
LockManager |
getLockManager(String name)
Returns the lock manager registered with the given name.
|
void |
registerContribution(Object contrib,
String xpoint,
ComponentInstance contributor) |
void |
registerLockManager(String name,
LockManager lockManager) |
protected void |
removeContribution(LockManagerDescriptor descriptor) |
void |
unregisterContribution(Object contrib,
String xpoint,
ComponentInstance contributor) |
void |
unregisterLockManager(String name) |
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected LockManagerService.LockManagerDescriptorRegistry registry
protected Map<String,LockManager> lockManagers
public LockManagerService()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contrib, String xpoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contrib, String xpoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
protected void addContribution(LockManagerDescriptor descriptor)
protected void removeContribution(LockManagerDescriptor descriptor)
public LockManager getLockManager(String name)
Lazily constructs it if needed.
name
- the lock manager namenull
if none is registeredpublic void registerLockManager(String name, LockManager lockManager)
public void unregisterLockManager(String name)
Copyright © 2018 Nuxeo. All rights reserved.