Search in sources :

Example 16 with TransactionToken

use of com.palantir.atlasdb.api.TransactionToken in project atlasdb by palantir.

the class AtlasDbServiceImpl method commit.

@Override
public void commit(TransactionToken token) {
    RawTransaction tx = transactions.getIfPresent(token);
    if (tx != null) {
        txManager.finishRunTaskWithLockThrowOnConflict(tx, (TxTask) transaction -> null);
        transactions.invalidate(token);
    }
}
Also used : TableCellVal(com.palantir.atlasdb.api.TableCellVal) TableRowResult(com.palantir.atlasdb.api.TableRowResult) ColumnMetadataDescription(com.palantir.atlasdb.table.description.ColumnMetadataDescription) ConflictHandler(com.palantir.atlasdb.transaction.api.ConflictHandler) BatchingVisitable(com.palantir.common.base.BatchingVisitable) ColumnValueDescription(com.palantir.atlasdb.table.description.ColumnValueDescription) Inject(javax.inject.Inject) RangeToken(com.palantir.atlasdb.api.RangeToken) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) TableReference(com.palantir.atlasdb.keyvalue.api.TableReference) SerializableTransactionManager(com.palantir.atlasdb.transaction.impl.SerializableTransactionManager) RuntimeTransactionTask(com.palantir.atlasdb.transaction.api.RuntimeTransactionTask) BatchingVisitables(com.palantir.common.base.BatchingVisitables) TableRowSelection(com.palantir.atlasdb.api.TableRowSelection) TableRange(com.palantir.atlasdb.api.TableRange) TableMetadataPersistence(com.palantir.atlasdb.protos.generated.TableMetadataPersistence) TableMetadata(com.palantir.atlasdb.table.description.TableMetadata) ImmutableSet(com.google.common.collect.ImmutableSet) Cell(com.palantir.atlasdb.keyvalue.api.Cell) Collection(java.util.Collection) NameComponentDescription(com.palantir.atlasdb.table.description.NameComponentDescription) Set(java.util.Set) PreCommitConditions(com.palantir.atlasdb.transaction.impl.PreCommitConditions) UUID(java.util.UUID) RawTransaction(com.palantir.atlasdb.transaction.impl.RawTransaction) Collectors(java.util.stream.Collectors) TableCell(com.palantir.atlasdb.api.TableCell) RangeRequest(com.palantir.atlasdb.keyvalue.api.RangeRequest) TimeUnit(java.util.concurrent.TimeUnit) RowResult(com.palantir.atlasdb.keyvalue.api.RowResult) List(java.util.List) TxTask(com.palantir.atlasdb.transaction.impl.TxTask) TransactionToken(com.palantir.atlasdb.api.TransactionToken) ValueType(com.palantir.atlasdb.table.description.ValueType) KeyValueService(com.palantir.atlasdb.keyvalue.api.KeyValueService) AtlasDbService(com.palantir.atlasdb.api.AtlasDbService) Preconditions(com.google.common.base.Preconditions) NameMetadataDescription(com.palantir.atlasdb.table.description.NameMetadataDescription) CacheBuilder(com.google.common.cache.CacheBuilder) Cache(com.google.common.cache.Cache) DynamicColumnDescription(com.palantir.atlasdb.table.description.DynamicColumnDescription) RawTransaction(com.palantir.atlasdb.transaction.impl.RawTransaction)

Aggregations

TransactionToken (com.palantir.atlasdb.api.TransactionToken)16 Test (org.junit.Test)11 TableCellVal (com.palantir.atlasdb.api.TableCellVal)9 RangeToken (com.palantir.atlasdb.api.RangeToken)7 TableRange (com.palantir.atlasdb.api.TableRange)7 TableCell (com.palantir.atlasdb.api.TableCell)6 Cell (com.palantir.atlasdb.keyvalue.api.Cell)5 TableRowResult (com.palantir.atlasdb.api.TableRowResult)4 TableRowSelection (com.palantir.atlasdb.api.TableRowSelection)4 RawTransaction (com.palantir.atlasdb.transaction.impl.RawTransaction)3 Preconditions (com.google.common.base.Preconditions)2 Cache (com.google.common.cache.Cache)2 CacheBuilder (com.google.common.cache.CacheBuilder)2 ImmutableList (com.google.common.collect.ImmutableList)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 AtlasDbService (com.palantir.atlasdb.api.AtlasDbService)2 KeyValueService (com.palantir.atlasdb.keyvalue.api.KeyValueService)2 RangeRequest (com.palantir.atlasdb.keyvalue.api.RangeRequest)2 RowResult (com.palantir.atlasdb.keyvalue.api.RowResult)2 TableReference (com.palantir.atlasdb.keyvalue.api.TableReference)2