Interface ServerManager

    • Method Detail

      • getInfo

        ServerInfo getInfo()
        Get Server information, version, modules, factories, etc
      • getInfo

        void getInfo​(Continuation<ServerInfo> cont)
        Get Server information, version, modules, factories, etc
      • getPipelines

        List<MediaPipeline> getPipelines()
        Get All the pipelines available in the server
      • getSessions

        List<String> getSessions()
        Get All active sessions in the server
      • getMetadata

        String getMetadata()
        Get Metadata stored in the server
      • getMetadata

        void getMetadata​(Continuation<String> cont)
        Get Metadata stored in the server
      • getKmd

        String getKmd​(String moduleName)
        Returns the kmd associated to a module
        Parameters:
        moduleName - Name of the module to get its kmd file
        Returns:
        The kmd file. *
      • getKmd

        TFuture<String> getKmd​(Transaction tx,
                               String moduleName)
        Returns the kmd associated to a module
        Parameters:
        moduleName - Name of the module to get its kmd file
        Returns:
        The kmd file. *
      • getCpuCount

        int getCpuCount()
        Number of CPU cores that the media server can use.

        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.

        Returns:
        Number of CPU cores available for the media server. *
      • getCpuCount

        TFuture<Integer> getCpuCount​(Transaction tx)
        Number of CPU cores that the media server can use.

        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.

        Returns:
        Number of CPU cores available for the media server. *
      • getUsedCpu

        float getUsedCpu​(int interval)
        Average CPU usage of the server.

        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).

        Parameters:
        interval - Time to measure the average CPU usage, in milliseconds.
        Returns:
        CPU usage %. *
      • getUsedCpu

        TFuture<Float> getUsedCpu​(Transaction tx,
                                  int interval)
        Average CPU usage of the server.

        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).

        Parameters:
        interval - Time to measure the average CPU usage, in milliseconds.
        Returns:
        CPU usage %. *
      • getUsedMemory

        long getUsedMemory()
        Returns the amount of memory that the server is using, in KiB
        Returns:
        Used memory, in KiB. *
      • getUsedMemory

        TFuture<Long> getUsedMemory​(Transaction tx)
        Returns the amount of memory that the server is using, in KiB
        Returns:
        Used memory, in KiB. *
      • removeObjectCreatedListener

        void removeObjectCreatedListener​(ListenerSubscription listenerSubscription,
                                         Continuation<Void> cont)
        Remove a ListenerSubscription for event ObjectCreatedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.
        Parameters:
        listenerSubscription - Listener subscription to be removed
        cont - Continuation to be called when the listener is removed
      • removeObjectDestroyedListener

        void removeObjectDestroyedListener​(ListenerSubscription listenerSubscription,
                                           Continuation<Void> cont)
        Remove a ListenerSubscription for event ObjectDestroyedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.
        Parameters:
        listenerSubscription - Listener subscription to be removed
        cont - Continuation to be called when the listener is removed