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

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.

Methods

getInstance

Singleton getInstance.

Returns
TypeDescription
Google\Cloud\Core\Batch\InMemoryConfigStorage

__sleep

To prevent serialize.

__wakeup

To prevent unserialize.

lock

Just return true

Returns
TypeDescription
bool

unlock

Just return true

Returns
TypeDescription
bool

save

Save the given JobConfig.

Parameter
NameDescription
config Google\Cloud\Core\Batch\JobConfig

A JobConfig to save.

Returns
TypeDescription
bool

load

Load a JobConfig from the storage.

Returns
TypeDescription
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
NameDescription
item mixed

An item to submit.

idNum int

A numeric id for the job.

Returns
TypeDescription
void

flush

Run the job with the given id.

Parameter
NameDescription
idNum int

A numeric id for the job.

Returns
TypeDescription
bool

shutdown

Run the job for remainder items.