Google Cloud PHP shared dependency, providing functionality useful to all components. Client - Class InMemoryConfigStorage (1.51.2)

Reference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class InMemoryConfigStorage.

In-memory ConfigStorageInterface implementation.

Namespace

Google \ Cloud \ Core \ Batch

Methods

__sleep

To prevent serialize.

__wakeup

To prevent unserialize.

lock

Just return true

Returns
Type Description
bool

unlock

Just return true

Returns
Type Description
bool

save

Save the given JobConfig.

Parameter
Name Description
config Google\Cloud\Core\Batch\JobConfig

A JobConfig to save.

Returns
Type Description
bool

load

Load a JobConfig from the storage.

Returns
Type Description
Google\Cloud\Core\Batch\JobConfig

clear

Clear the JobConfig from storage.

submit

Hold the items in memory and run the job in the same process when it meets the condition.

We want to delay registering the shutdown function. The error reporter also registers a shutdown function and the order matters. Google\Cloud\Core\Batch\Google\ErrorReporting\Bootstrap::init() http://php.net/manual/en/function.register-shutdown-function.php

Parameters
Name Description
item mixed

An item to submit.

idNum int

A numeric id for the job.

Returns
Type Description
void

flush

Run the job with the given id.

Parameter
Name Description
idNum int

A numeric id for the job.

Returns
Type Description
bool

shutdown

Run the job for remainder items.

static::getInstance

Singleton getInstance.

Returns
Type Description
Google\Cloud\Core\Batch\InMemoryConfigStorage