public interface ServerManager extends MediaObject
Modifier and Type | Method and Description |
---|---|
ListenerSubscription |
addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener)
Add a
EventListener for event ObjectCreatedEvent . |
void |
addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener,
Continuation<ListenerSubscription> cont)
Add a
EventListener for event ObjectCreatedEvent . |
ListenerSubscription |
addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener)
Add a
EventListener for event ObjectDestroyedEvent . |
void |
addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener,
Continuation<ListenerSubscription> cont)
Add a
EventListener for event ObjectDestroyedEvent . |
int |
getCpuCount()
Number of CPU cores that the media server can use.
|
void |
getCpuCount(Continuation<Integer> cont)
Asynchronous version of getCpuCount:
Continuation.onSuccess(F) is called when the action is
done. |
TFuture<Integer> |
getCpuCount(Transaction tx)
Number of CPU cores that the media server can use.
|
ServerInfo |
getInfo()
Get Server information, version, modules, factories, etc
|
void |
getInfo(Continuation<ServerInfo> cont)
Get Server information, version, modules, factories, etc
|
TFuture<ServerInfo> |
getInfo(Transaction tx)
Get Server information, version, modules, factories, etc
|
String |
getKmd(String moduleName)
Returns the kmd associated to a module
|
void |
getKmd(String moduleName,
Continuation<String> cont)
Asynchronous version of getKmd:
Continuation.onSuccess(F) is called when the action is
done. |
TFuture<String> |
getKmd(Transaction tx,
String moduleName)
Returns the kmd associated to a module
|
String |
getMetadata()
Get Metadata stored in the server
|
void |
getMetadata(Continuation<String> cont)
Get Metadata stored in the server
|
TFuture<String> |
getMetadata(Transaction tx)
Get Metadata stored in the server
|
List<MediaPipeline> |
getPipelines()
Get All the pipelines available in the server
|
void |
getPipelines(Continuation<List<MediaPipeline>> cont)
Get All the pipelines available in the server
|
TFuture<List<MediaPipeline>> |
getPipelines(Transaction tx)
Get All the pipelines available in the server
|
List<String> |
getSessions()
Get All active sessions in the server
|
void |
getSessions(Continuation<List<String>> cont)
Get All active sessions in the server
|
TFuture<List<String>> |
getSessions(Transaction tx)
Get All active sessions in the server
|
float |
getUsedCpu(int interval)
Average CPU usage of the server.
|
void |
getUsedCpu(int interval,
Continuation<Float> cont)
Asynchronous version of getUsedCpu:
Continuation.onSuccess(F) is called when the action is
done. |
TFuture<Float> |
getUsedCpu(Transaction tx,
int interval)
Average CPU usage of the server.
|
long |
getUsedMemory()
Returns the amount of memory that the server is using, in KiB
|
void |
getUsedMemory(Continuation<Long> cont)
Asynchronous version of getUsedMemory:
Continuation.onSuccess(F) is called when the action is
done. |
TFuture<Long> |
getUsedMemory(Transaction tx)
Returns the amount of memory that the server is using, in KiB
|
void |
removeObjectCreatedListener(ListenerSubscription listenerSubscription)
Remove a
ListenerSubscription for event ObjectCreatedEvent . |
void |
removeObjectCreatedListener(ListenerSubscription listenerSubscription,
Continuation<Void> cont)
Remove a
ListenerSubscription for event ObjectCreatedEvent . |
void |
removeObjectDestroyedListener(ListenerSubscription listenerSubscription)
Remove a
ListenerSubscription for event ObjectDestroyedEvent . |
void |
removeObjectDestroyedListener(ListenerSubscription listenerSubscription,
Continuation<Void> cont)
Remove a
ListenerSubscription for event ObjectDestroyedEvent . |
addErrorListener, addErrorListener, addTag, addTag, addTag, getChildren, getChildren, getChildren, getChilds, getChilds, getChilds, getCreationTime, getCreationTime, getCreationTime, getId, getId, getId, getMediaPipeline, getMediaPipeline, getMediaPipeline, getName, getName, getName, getParent, getParent, getParent, getSendTagsInEvents, getSendTagsInEvents, getSendTagsInEvents, getTag, getTag, getTag, getTags, getTags, getTags, removeErrorListener, removeErrorListener, removeTag, removeTag, removeTag, setName, setName, setName, setSendTagsInEvents, setSendTagsInEvents, setSendTagsInEvents
isCommited, release, release, release, waitCommited, whenCommited, whenCommited
ServerInfo getInfo()
void getInfo(Continuation<ServerInfo> cont)
TFuture<ServerInfo> getInfo(Transaction tx)
List<MediaPipeline> getPipelines()
void getPipelines(Continuation<List<MediaPipeline>> cont)
TFuture<List<MediaPipeline>> getPipelines(Transaction tx)
void getSessions(Continuation<List<String>> cont)
TFuture<List<String>> getSessions(Transaction tx)
String getMetadata()
void getMetadata(Continuation<String> cont)
TFuture<String> getMetadata(Transaction tx)
String getKmd(String moduleName)
moduleName
- Name of the module to get its kmd filevoid getKmd(String moduleName, Continuation<String> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.moduleName
- Name of the module to get its kmd filegetKmd(java.lang.String)
TFuture<String> getKmd(Transaction tx, String moduleName)
moduleName
- Name of the module to get its kmd fileint getCpuCount()
Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.
For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.
Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.
void getCpuCount(Continuation<Integer> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.getCpuCount()
TFuture<Integer> getCpuCount(Transaction tx)
Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.
For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.
Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.
float getUsedCpu(int interval)
This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.
The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).
interval
- Time to measure the average CPU usage, in milliseconds.void getUsedCpu(int interval, Continuation<Float> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.interval
- Time to measure the average CPU usage, in milliseconds.getUsedCpu(int)
TFuture<Float> getUsedCpu(Transaction tx, int interval)
This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.
The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).
interval
- Time to measure the average CPU usage, in milliseconds.long getUsedMemory()
void getUsedMemory(Continuation<Long> cont)
Continuation.onSuccess(F)
is called when the action is
done. If an error occurs, Continuation.onError(java.lang.Throwable)
is called.getUsedMemory()
TFuture<Long> getUsedMemory(Transaction tx)
ListenerSubscription addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener)
EventListener
for event ObjectCreatedEvent
. Synchronous call.listener
- Listener to be called on ObjectCreatedEventvoid addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont)
EventListener
for event ObjectCreatedEvent
. Asynchronous call.
Calls Continuation<ListenerSubscription> when it has been added.listener
- Listener to be called on ObjectCreatedEventcont
- Continuation to be called when the listener is registeredvoid removeObjectCreatedListener(ListenerSubscription listenerSubscription)
ListenerSubscription
for event ObjectCreatedEvent
. Synchronous call.listenerSubscription
- Listener subscription to be removedvoid removeObjectCreatedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
ListenerSubscription
for event ObjectCreatedEvent
. Asynchronous call.
Calls Continuation<Void> when it has been removed.listenerSubscription
- Listener subscription to be removedcont
- Continuation to be called when the listener is removedListenerSubscription addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener)
EventListener
for event ObjectDestroyedEvent
. Synchronous call.listener
- Listener to be called on ObjectDestroyedEventvoid addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont)
EventListener
for event ObjectDestroyedEvent
. Asynchronous call.
Calls Continuation<ListenerSubscription> when it has been added.listener
- Listener to be called on ObjectDestroyedEventcont
- Continuation to be called when the listener is registeredvoid removeObjectDestroyedListener(ListenerSubscription listenerSubscription)
ListenerSubscription
for event ObjectDestroyedEvent
. Synchronous call.listenerSubscription
- Listener subscription to be removedvoid removeObjectDestroyedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
ListenerSubscription
for event ObjectDestroyedEvent
. Asynchronous call.
Calls Continuation<Void> when it has been removed.listenerSubscription
- Listener subscription to be removedcont
- Continuation to be called when the listener is removedCopyright © 2020 Kurento. All rights reserved.