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

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. {@see} {@see}

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.