RpcNsMgmtInqExpAge
The RpcNsMgmtInqExpAge
function returns the global expiration age for local copies of name-service
data.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsMgmtInqExpAge(
unsigned long * ExpirationAge |
|
); |
|
Parameters
ExpirationAge
Returns a
pointer to the default expiration age, in seconds. This value is used by all
name-service read operations (that is, all next operations).
Remarks
The RpcNsMgmtInqExpAge
routine returns the expiration age that the application is using. The
expiration age is the amount of time in seconds that a local copy of data from
a name-service attribute can exist before a request from the application for
the attribute requires updating the local copy. When an application begins running,
the RPC run-time library specifies a random value of two hours as the default
expiration age. The default is global to the application.
An expiration
age is used by name-service next operations (which read data from
name-service attributes). A next operation normally starts by looking for a
local copy of the attribute data being requested by an application. In the
absence of a local copy, the next operation creates one with fresh attribute
data from the name-service database. If a local copy already exists, the
operation compares its actual age to the expiration age being used by the
application. If the actual age exceeds the expiration age, the operation
automatically tries to update the local copy with fresh attribute data. If
updating is impossible, the old local data remains in place and the next
operation fails.
Applications
normally should use only the default expiration age. For special cases,
however, an application can substitute a user-supplied global expiration age
for the default by calling the RpcNsMgmtSetExpAge routine. The RpcNsMgmtInqExpAge
routine returns the current global expiration age, whether a default or a
user-supplied value.
An
application can also override the global expiration age temporarily by calling
the RpcNsMgmtHandleSetExpAge routine.
Return Values
Value |
Meaning |
RPC_S_OK |
Success |
See Also