public class LeaseSerializer extends Object implements ILeaseSerializer<Lease>
| Modifier and Type | Field and Description |
|---|---|
Class<? extends Lease> |
clazz |
String |
LEASE_COUNTER_KEY |
String |
LEASE_KEY_KEY |
String |
LEASE_OWNER_KEY |
| Constructor and Description |
|---|
LeaseSerializer() |
LeaseSerializer(Class<? extends Lease> clazz) |
| Modifier and Type | Method and Description |
|---|---|
Lease |
fromDynamoRecord(Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> dynamoRecord)
Construct a Lease object out of a DynamoDB record.
|
Collection<com.amazonaws.services.dynamodbv2.model.AttributeDefinition> |
getAttributeDefinitions() |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoEvictLeaseUpdate(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoExistentExpectation(String leaseKey) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> |
getDynamoHashKey(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> |
getDynamoHashKey(String leaseKey)
Special getDynamoHashKey implementation used by ILeaseManager.getLease().
|
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoLeaseCheckpointExpectation(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoLeaseCounterExpectation(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoLeaseCounterExpectation(Long leaseCounter) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoLeaseCounterUpdate(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoLeaseCounterUpdate(Long leaseCounter) |
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoLeaseOwnerExpectation(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> |
getDynamoNonexistantExpectation() |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoTakeLeaseUpdate(Lease lease,
String owner) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoUpdateLeaseUpdate(Lease lease) |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> |
getDynamoUpdateLeaseUpdate(Lease lease,
UpdateField updateField) |
Collection<com.amazonaws.services.dynamodbv2.model.KeySchemaElement> |
getKeySchema() |
Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> |
toDynamoRecord(Lease lease)
Construct a DynamoDB record out of a Lease object
|
public final String LEASE_KEY_KEY
public final String LEASE_OWNER_KEY
public final String LEASE_COUNTER_KEY
public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> toDynamoRecord(Lease lease)
ILeaseSerializertoDynamoRecord in interface ILeaseSerializer<Lease>lease - lease object to serializepublic Lease fromDynamoRecord(Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> dynamoRecord)
ILeaseSerializerfromDynamoRecord in interface ILeaseSerializer<Lease>dynamoRecord - attribute value map from DynamoDBpublic Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> getDynamoHashKey(String leaseKey)
ILeaseSerializergetDynamoHashKey in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValue> getDynamoHashKey(Lease lease)
getDynamoHashKey in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoLeaseCounterExpectation(Lease lease)
getDynamoLeaseCounterExpectation in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoLeaseCounterExpectation(Long leaseCounter)
public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoLeaseOwnerExpectation(Lease lease)
getDynamoLeaseOwnerExpectation in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoLeaseCheckpointExpectation(Lease lease)
getDynamoLeaseCheckpointExpectation in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoNonexistantExpectation()
getDynamoNonexistantExpectation in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue> getDynamoExistentExpectation(String leaseKey)
getDynamoExistentExpectation in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoLeaseCounterUpdate(Lease lease)
getDynamoLeaseCounterUpdate in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoLeaseCounterUpdate(Long leaseCounter)
public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoTakeLeaseUpdate(Lease lease, String owner)
getDynamoTakeLeaseUpdate in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoEvictLeaseUpdate(Lease lease)
getDynamoEvictLeaseUpdate in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoUpdateLeaseUpdate(Lease lease)
getDynamoUpdateLeaseUpdate in interface ILeaseSerializer<Lease>public Map<String,com.amazonaws.services.dynamodbv2.model.AttributeValueUpdate> getDynamoUpdateLeaseUpdate(Lease lease, UpdateField updateField)
getDynamoUpdateLeaseUpdate in interface ILeaseSerializer<Lease>public Collection<com.amazonaws.services.dynamodbv2.model.KeySchemaElement> getKeySchema()
getKeySchema in interface ILeaseSerializer<Lease>public Collection<com.amazonaws.services.dynamodbv2.model.AttributeDefinition> getAttributeDefinitions()
getAttributeDefinitions in interface ILeaseSerializer<Lease>Copyright © 2023. All rights reserved.