REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 1.94 KB
Close
/home/godevadmin/www/admin/vendor/aws/Aws/DynamoDb/LockingSessionConnection.php
Text
Base64
<?php namespace Aws\DynamoDb; use Aws\DynamoDb\Exception\DynamoDbException; /** * The locking connection adds locking logic to the read operation. */ class LockingSessionConnection extends StandardSessionConnection { public function __construct(DynamoDbClient $client, array $config = []) { parent::__construct($client, $config); } /** * {@inheritdoc} * Retries the request until the lock can be acquired */ public function read($id) { // Create the params for the UpdateItem operation so that a lock can be // set and item returned (via ReturnValues) in a one, atomic operation. $params = [ 'TableName' => $this->getTableName(), 'Key' => $this->formatKey($id), 'Expected' => ['lock' => ['Exists' => false]], 'AttributeUpdates' => ['lock' => ['Value' => ['N' => '1']]], 'ReturnValues' => 'ALL_NEW', ]; // Acquire the lock and fetch the item data. $timeout = time() + $this->getMaxLockWaitTime(); while (true) { try { $item = []; $result = $this->client->updateItem($params); if (isset($result['Attributes'])) { foreach ($result['Attributes'] as $key => $value) { $item[$key] = current($value); } } return $item; } catch (DynamoDbException $e) { if ($e->getAwsErrorCode() === 'ConditionalCheckFailedException' && time() < $timeout ) { usleep(rand( $this->getMinLockRetryMicrotime(), $this->getMaxLockRetryMicrotime() )); } else { break; } } } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Exception
DIR
-
drwxrwxr-x
2024-06-18 20:10:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BinaryValue.php
780 B
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DynamoDbClient.php
12.33 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LockingSessionConnection.php
1.94 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Marshaler.php
9.83 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NumberValue.php
582 B
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SessionConnectionConfigTrait.php
6.11 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SessionConnectionInterface.php
1.04 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SessionHandler.php
8.08 KB
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SetValue.php
1010 B
lrwxrwxr-x
2024-06-18 20:10:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StandardSessionConnection.php
4.61 KB
lrwxrwxr-x
2024-06-18 20:10:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WriteRequestBatch.php
9.60 KB
lrwxrwxr-x
2024-06-18 20:10:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).