Package org.apache.fluo.api.client
Interface TransactionBase
-
- All Superinterfaces:
SnapshotBase
- All Known Subinterfaces:
Transaction
- All Known Implementing Classes:
AbstractTransactionBase
public interface TransactionBase extends SnapshotBase
Enables users to read and write to a Fluo table at certain point in time. TransactionBase extendsSnapshotBase
to include methods for writing to Fluo.- Since:
- 1.0.0
- See Also:
AbstractTransactionBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
delete(CharSequence row, Column col)
Wrapper fordelete(Bytes, Column)
that uses Strings.void
delete(Bytes row, Column col)
Deletes the value at the given row andColumn
void
set(CharSequence row, Column col, CharSequence value)
Wrapper forset(Bytes, Column, Bytes)
that uses Strings.void
set(Bytes row, Column col, Bytes value)
void
setWeakNotification(CharSequence row, Column col)
Wrapper forsetWeakNotification(Bytes, Column)
that uses Strings.void
setWeakNotification(Bytes row, Column col)
Sets a weak notification at the given row andColumn
default SnapshotBase
withReadLock()
Normally when a Fluo transaction reads data and does not write to it, it will not collide with other transactions making concurrent writes.
-
-
-
Method Detail
-
delete
void delete(CharSequence row, Column col)
Wrapper fordelete(Bytes, Column)
that uses Strings. All String are encoded using UTF-8.
-
set
void set(Bytes row, Column col, Bytes value) throws AlreadySetException
- Throws:
AlreadySetException
-
set
void set(CharSequence row, Column col, CharSequence value) throws AlreadySetException
Wrapper forset(Bytes, Column, Bytes)
that uses Strings. All String are encoded using UTF-8.- Throws:
AlreadySetException
-
setWeakNotification
void setWeakNotification(Bytes row, Column col)
Sets a weak notification at the given row andColumn
-
setWeakNotification
void setWeakNotification(CharSequence row, Column col)
Wrapper forsetWeakNotification(Bytes, Column)
that uses Strings. All String are encoded using UTF-8.
-
withReadLock
default SnapshotBase withReadLock()
Normally when a Fluo transaction reads data and does not write to it, it will not collide with other transactions making concurrent writes. When this method is called, all reads will acquire a read lock. These read locks cause collisions with transactions doing concurrent writes. However, multiple transactions can get concurrent read locks on the same row+col without colliding.Scanning with read locks is not supported. Attempting to call
withReadLock().scanner()
will throw anUnsupportedOperationException
. This is because there are an infinite amount of keys within a range and read locks can not be obtained on them all.A transaction that only acquires read locks will do nothing at commit time. In this case no read locks are actually written and no collisions will ever occur.
- Since:
- 1.2.0
-
-