Learn R Programming

nws (version 1.6.2)

nwsOpenWs: nwsServer Class Method

Description

Create and owned a netWorkSpace, if it does not already exist. If the netWorkSpace already exists, but no one owns it, then caller will claim the ownership of the netWorkspace. If the netWorkSpace already exists and someone already claimed the ownership of it, then caller simply make connection to the netWorkspace.

Usage

## S3 method for class 'nwsServer':
nwsOpenWs(.Object, wsName, space=NULL, ...)

Arguments

.Object
a nwsServer class object
wsName
name of the netWorkSpace to be created
space
a netWorkSpace class object
...
optional arguments related to the persistent state of a netWorkSpace

Details

If space argument is not provided, then create a shared netWorkSpace with the name wsName to the server represented by .Object. Otherwise, use the existing netWorkSpace object provided by argument space.

Optional argument, 'persistent', is a boolean value indicating whether the shared netWorkSpace is persistent or not. If the netWorkSpace is persisent (TRUE or 1), then the netWorkspace is not purged when the owner of the shared netWorkSpace exited. Otherwise, the netWorkSpace will be purged.

See Also

nwsUseWs

Examples

Run this code
# example 1
nwss <- nwsServer()
ws <- nwsOpenWs(nwss, "nws example")

# example 2
xs <- nwsOpenWs(nwss, wsName='nws example', space=ws)

# example 3
ys <- nwsOpenWs(nwss, "persistent space", persistent=TRUE)

Run the code above in your browser using DataLab