NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Interface LockingStrategyInterface

An interface describing how a locking strategy should be defined

### Direct known implementers

`Aws\DynamoDb\Session\LockingStrategy\AbstractLockingStrategy`

### Indirect known implementers

`Aws\DynamoDb\Session\LockingStrategy\NullLockingStrategy`, `Aws\DynamoDb\Session\LockingStrategy\PessimisticLockingStrategy`

Namespace: Aws\DynamoDb\Session\LockingStrategy
Located at Aws/DynamoDb/Session/LockingStrategy/LockingStrategyInterface.php

## Methods summary

- `public` `doRead ( string $id )`

  Reads the session data from Dynamo DB

- `public` `doWrite ( string $id, string $data, bool $isDataChanged )`

  Writes the session data to Dynamo DB

- `public` `doDestroy ( string $id )`

  Deletes a session record from Dynamo DB

## Methods detail

# `public array`
`doRead( string $id )`

Reads the session data from Dynamo DB

#### Parameters

$id
  `string`
  $id The session ID

#### Returns

`array`
# `public boolean`
`doWrite( string $id, string $data, boolean $isDataChanged )`

Writes the session data to Dynamo DB

#### Parameters

$id
  `string`
  $id The session ID
$data
  `string`
  $data The serialized session data
$isDataChanged
  `boolean`
  $isDataChanged Whether or not the data has changed

#### Returns

`boolean`
# `public boolean`
`doDestroy( string $id )`

Deletes a session record from Dynamo DB

#### Parameters

$id
  `string`
  $id The session ID

#### Returns

`boolean`

### Magic methods summary