public class DefaultProcessContextRegistry extends java.lang.Object implements ProcessContextRegistry
ProcessContextRegistry implementation based on a ConcurrentHashMap and an
AtomicInteger for pid generation.| Constructor and Description |
|---|
DefaultProcessContextRegistry() |
| Modifier and Type | Method and Description |
|---|---|
int |
register(ProcessContext context)
Registers the given
ProcessContext, creates a new internal id for it and returns it. |
ProcessContext |
retrieve(int pid)
Retrieves the
ProcessContext uniquely identified by the passed pid. |
void |
unregister(int pid)
Unregisters (removes) the
ProcessContext identified by the given pid. |
public int register(ProcessContext context)
ProcessContext, creates a new internal id for it and returns it.register in interface ProcessContextRegistrycontext - the context to registerProcessContextProcessContextRegistry.register(ProcessContext)public void unregister(int pid)
ProcessContext identified by the given pid.
If no ProcessContext is registered for the specified id, calling this method has no effect; no exception
is thrown.unregister in interface ProcessContextRegistrypid - the locally unique id of the registered ProcessContext.ProcessContextRegistry.unregister(int)public ProcessContext retrieve(int pid)
ProcessContext uniquely identified by the passed pid.retrieve in interface ProcessContextRegistrypid - the locally unique id of the registered ProcessContext.ProcessContext registered for the specified pid or null
if no such context is known.ProcessContextRegistry.retrieve(int)Copyright © 2018 SAP SE. All Rights Reserved.