getDatabaseRole

getDatabaseRole(): Integer;

The getDatabaseRole method of the System class returns an integer value that represents the database role of the server node on which the JADE system is running.

The System class getDatabaseRole method is an alias for the JadeDatabaseAdmin class sdsGetDatabaseRole method and it enables you to obtain the current database role for the JADE system in which it is executing without having to create and then delete an instance of the JadeDatabaseAdmin class.

The returned value is one of the SDSDatabaseRoles category global constants listed in the following table.

Global Constant Integer Value
SDS_RolePrimary 1
SDS_RoleSecondary 2
SDS_RoleUndefined (returned when the method is invoked on a non-SDS-capable or non‑RPS-capable system) 0