public abstract class AbstractDataset extends Object implements Dataset, MeteredDataset, org.apache.tephra.TransactionAware
Dataset
that acts on a list of underlying datasets and
implements TransactionAware
and MeteredDataset
interfaces by propagating
corresponded logic to each dataset in a list when possible.Constructor and Description |
---|
AbstractDataset(String instanceName,
Dataset embedded,
Dataset... otherEmbedded) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
commitTx() |
protected String |
getName() |
String |
getTransactionAwareName() |
Collection<byte[]> |
getTxChanges() |
void |
postTxCommit() |
boolean |
rollbackTx() |
void |
setMetricsCollector(MetricsCollector metricsCollector)
Sets data ops metrics collector
|
void |
startTx(org.apache.tephra.Transaction tx) |
String |
toString() |
void |
updateTx(org.apache.tephra.Transaction tx) |
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void setMetricsCollector(MetricsCollector metricsCollector)
MeteredDataset
setMetricsCollector
in interface MeteredDataset
metricsCollector
- metrics collectorpublic void startTx(org.apache.tephra.Transaction tx)
startTx
in interface org.apache.tephra.TransactionAware
public void updateTx(org.apache.tephra.Transaction tx)
updateTx
in interface org.apache.tephra.TransactionAware
public Collection<byte[]> getTxChanges()
getTxChanges
in interface org.apache.tephra.TransactionAware
public boolean commitTx() throws Exception
commitTx
in interface org.apache.tephra.TransactionAware
Exception
public void postTxCommit()
postTxCommit
in interface org.apache.tephra.TransactionAware
public boolean rollbackTx() throws Exception
rollbackTx
in interface org.apache.tephra.TransactionAware
Exception
public String getTransactionAwareName()
getTransactionAwareName
in interface org.apache.tephra.TransactionAware
protected String getName()
Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.