sharedObjectProperty: Get/Set the properties of the shared object.

Description Usage Arguments Value Examples

Description

Get/Set the properties of the shared object. The available properties are dataId, length, totalSize, dataType, ownData, copyOnWrite, sharedSubset, sharedCopy.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
getSharedObjectProperty(x, property = NULL, ...)

setSharedObjectProperty(x, property, value, ...)

## S4 method for signature 'ANY,characterOrNULLOrMissing'
getSharedObjectProperty(x, property = NULL, ...)

## S4 method for signature 'list,characterOrNULLOrMissing'
getSharedObjectProperty(x, property = NULL, ...)

## S4 method for signature 'ANY,characterOrNULLOrMissing'
setSharedObjectProperty(x, property, value, ...)

## S4 method for signature 'list,characterOrNULLOrMissing'
setSharedObjectProperty(x, property, value, ...)

getCopyOnWrite(x)

getSharedSubset(x)

getSharedCopy(x)

setCopyOnWrite(x, value)

setSharedSubset(x, value)

setSharedCopy(x, value)

Arguments

x

A shared object

property

A character vector. The name of the property(s), if the argument is missing or the value is NULL, it represents all properties.

...

Not used

value

The new value of the property, if the length of value does not match the length of the property, the argument value will be repeated to match the length.

Value

get: The property(s) of a shared object

set: No return value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
x = share(1:20)

## Check the default values
getSharedObjectProperty(x, NULL)
getCopyOnWrite(x)
getSharedSubset(x)
getSharedCopy(x)

## Set the values
setCopyOnWrite(x, FALSE)
setSharedSubset(x, FALSE)
setSharedCopy(x, TRUE)

## Check the values again
getSharedObjectProperty(x, NULL)
getCopyOnWrite(x)
getSharedSubset(x)
getSharedCopy(x)

SharedObject documentation built on Nov. 8, 2020, 8:17 p.m.