public final class BlockchainImpl extends java.lang.Object implements Blockchain
| Modifier and Type | Method and Description |
|---|---|
DbIterator<BlockImpl> |
getAllBlocks() |
BlockImpl |
getBlock(long blockId) |
BlockImpl |
getBlock(long blockId,
boolean loadTransactions) |
BlockImpl |
getBlockAtHeight(int height) |
int |
getBlockCount(long accountId) |
long |
getBlockIdAtHeight(int height) |
java.util.List<java.lang.Long> |
getBlockIdsAfter(long blockId,
int limit) |
DbIterator<BlockImpl> |
getBlocks(java.sql.Connection con,
java.sql.PreparedStatement pstmt) |
DbIterator<BlockImpl> |
getBlocks(int from,
int to) |
DbIterator<BlockImpl> |
getBlocks(long accountId,
int timestamp) |
DbIterator<BlockImpl> |
getBlocks(long accountId,
int timestamp,
int from,
int to) |
java.util.List<BlockImpl> |
getBlocksAfter(long blockId,
int limit) |
java.util.List<BlockImpl> |
getBlocksAfter(long blockId,
java.util.List<java.lang.Long> blockList) |
BlockImpl |
getECBlock(int timestamp) |
DbIterator<? extends Transaction> |
getExecutedTransactions(Chain chain,
long senderId,
long recipientId,
byte type,
byte subtype,
int height,
int numberOfConfirmations,
int from,
int to) |
java.util.List<Transaction> |
getExpectedTransactions(Filter<Transaction> filter) |
FxtTransactionImpl |
getFxtTransaction(long transactionId) |
int |
getHeight() |
static BlockchainImpl |
getInstance() |
BlockImpl |
getLastBlock() |
BlockImpl |
getLastBlock(int timestamp) |
int |
getLastBlockTimestamp() |
DbIterator<ChildTransactionImpl> |
getReferencingTransactions(ChildChain childChain,
byte[] referencedTransactionFullHash,
int from,
int to) |
TransactionImpl |
getTransaction(Chain chain,
byte[] fullHash) |
int |
getTransactionCount(Chain chain) |
DbIterator<ChildTransactionImpl> |
getTransactions(ChildChain childChain,
java.sql.Connection con,
java.sql.PreparedStatement pstmt) |
DbIterator<ChildTransactionImpl> |
getTransactions(ChildChain childChain,
long accountId,
byte type,
byte subtype,
int blockTimestamp,
boolean includeExpiredPrunable) |
DbIterator<ChildTransactionImpl> |
getTransactions(ChildChain childChain,
long accountId,
int numberOfConfirmations,
byte type,
byte subtype,
int blockTimestamp,
boolean withMessage,
boolean phasedOnly,
boolean nonPhasedOnly,
int from,
int to,
boolean includeExpiredPrunable,
boolean executedOnly) |
DbIterator<FxtTransactionImpl> |
getTransactions(FxtChain chain,
java.sql.Connection con,
java.sql.PreparedStatement pstmt) |
DbIterator<? extends FxtTransaction> |
getTransactions(FxtChain chain,
long accountId,
int numberOfConfirmations,
byte type,
byte subtype,
int blockTimestamp,
int from,
int to) |
boolean |
hasBlock(long blockId) |
boolean |
hasFxtTransaction(long transactionId) |
boolean |
hasTransaction(Chain chain,
byte[] fullHash) |
void |
readLock() |
void |
readUnlock() |
void |
updateLock() |
void |
updateUnlock() |
void |
writeLock() |
void |
writeUnlock() |
public static BlockchainImpl getInstance()
public void readLock()
readLock in interface Blockchainpublic void readUnlock()
readUnlock in interface Blockchainpublic void updateLock()
updateLock in interface Blockchainpublic void updateUnlock()
updateUnlock in interface Blockchainpublic void writeLock()
public void writeUnlock()
public BlockImpl getLastBlock()
getLastBlock in interface Blockchainpublic int getHeight()
getHeight in interface Blockchainpublic int getLastBlockTimestamp()
getLastBlockTimestamp in interface Blockchainpublic BlockImpl getLastBlock(int timestamp)
getLastBlock in interface Blockchainpublic BlockImpl getBlock(long blockId)
getBlock in interface Blockchainpublic BlockImpl getBlock(long blockId, boolean loadTransactions)
getBlock in interface Blockchainpublic boolean hasBlock(long blockId)
hasBlock in interface Blockchainpublic DbIterator<BlockImpl> getAllBlocks()
getAllBlocks in interface Blockchainpublic DbIterator<BlockImpl> getBlocks(int from, int to)
getBlocks in interface Blockchainpublic DbIterator<BlockImpl> getBlocks(long accountId, int timestamp)
getBlocks in interface Blockchainpublic DbIterator<BlockImpl> getBlocks(long accountId, int timestamp, int from, int to)
getBlocks in interface Blockchainpublic int getBlockCount(long accountId)
getBlockCount in interface Blockchainpublic DbIterator<BlockImpl> getBlocks(java.sql.Connection con, java.sql.PreparedStatement pstmt)
getBlocks in interface Blockchainpublic java.util.List<java.lang.Long> getBlockIdsAfter(long blockId,
int limit)
getBlockIdsAfter in interface Blockchainpublic java.util.List<BlockImpl> getBlocksAfter(long blockId, int limit)
getBlocksAfter in interface Blockchainpublic java.util.List<BlockImpl> getBlocksAfter(long blockId, java.util.List<java.lang.Long> blockList)
getBlocksAfter in interface Blockchainpublic long getBlockIdAtHeight(int height)
getBlockIdAtHeight in interface Blockchainpublic BlockImpl getBlockAtHeight(int height)
getBlockAtHeight in interface Blockchainpublic BlockImpl getECBlock(int timestamp)
getECBlock in interface Blockchainpublic TransactionImpl getTransaction(Chain chain, byte[] fullHash)
getTransaction in interface Blockchainpublic boolean hasTransaction(Chain chain, byte[] fullHash)
hasTransaction in interface Blockchainpublic FxtTransactionImpl getFxtTransaction(long transactionId)
getFxtTransaction in interface Blockchainpublic boolean hasFxtTransaction(long transactionId)
hasFxtTransaction in interface Blockchainpublic int getTransactionCount(Chain chain)
getTransactionCount in interface Blockchainpublic DbIterator<ChildTransactionImpl> getTransactions(ChildChain childChain, long accountId, byte type, byte subtype, int blockTimestamp, boolean includeExpiredPrunable)
getTransactions in interface Blockchainpublic DbIterator<ChildTransactionImpl> getTransactions(ChildChain childChain, long accountId, int numberOfConfirmations, byte type, byte subtype, int blockTimestamp, boolean withMessage, boolean phasedOnly, boolean nonPhasedOnly, int from, int to, boolean includeExpiredPrunable, boolean executedOnly)
getTransactions in interface Blockchainpublic DbIterator<ChildTransactionImpl> getReferencingTransactions(ChildChain childChain, byte[] referencedTransactionFullHash, int from, int to)
getReferencingTransactions in interface Blockchainpublic DbIterator<? extends FxtTransaction> getTransactions(FxtChain chain, long accountId, int numberOfConfirmations, byte type, byte subtype, int blockTimestamp, int from, int to)
getTransactions in interface Blockchainpublic DbIterator<FxtTransactionImpl> getTransactions(FxtChain chain, java.sql.Connection con, java.sql.PreparedStatement pstmt)
getTransactions in interface Blockchainpublic DbIterator<ChildTransactionImpl> getTransactions(ChildChain childChain, java.sql.Connection con, java.sql.PreparedStatement pstmt)
getTransactions in interface Blockchainpublic java.util.List<Transaction> getExpectedTransactions(Filter<Transaction> filter)
getExpectedTransactions in interface Blockchainpublic DbIterator<? extends Transaction> getExecutedTransactions(Chain chain, long senderId, long recipientId, byte type, byte subtype, int height, int numberOfConfirmations, int from, int to)
getExecutedTransactions in interface Blockchain