getSharedObjectProperty {SharedObject}R Documentation

Get/Set the properties of the shared object.

Description

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

Usage

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

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)

[Package SharedObject version 1.4.0 Index]