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 Blockchain
public void readUnlock()
readUnlock
in interface Blockchain
public void updateLock()
updateLock
in interface Blockchain
public void updateUnlock()
updateUnlock
in interface Blockchain
public void writeLock()
public void writeUnlock()
public BlockImpl getLastBlock()
getLastBlock
in interface Blockchain
public int getHeight()
getHeight
in interface Blockchain
public int getLastBlockTimestamp()
getLastBlockTimestamp
in interface Blockchain
public BlockImpl getLastBlock(int timestamp)
getLastBlock
in interface Blockchain
public BlockImpl getBlock(long blockId)
getBlock
in interface Blockchain
public BlockImpl getBlock(long blockId, boolean loadTransactions)
getBlock
in interface Blockchain
public boolean hasBlock(long blockId)
hasBlock
in interface Blockchain
public DbIterator<BlockImpl> getAllBlocks()
getAllBlocks
in interface Blockchain
public DbIterator<BlockImpl> getBlocks(int from, int to)
getBlocks
in interface Blockchain
public DbIterator<BlockImpl> getBlocks(long accountId, int timestamp)
getBlocks
in interface Blockchain
public DbIterator<BlockImpl> getBlocks(long accountId, int timestamp, int from, int to)
getBlocks
in interface Blockchain
public int getBlockCount(long accountId)
getBlockCount
in interface Blockchain
public DbIterator<BlockImpl> getBlocks(java.sql.Connection con, java.sql.PreparedStatement pstmt)
getBlocks
in interface Blockchain
public java.util.List<java.lang.Long> getBlockIdsAfter(long blockId, int limit)
getBlockIdsAfter
in interface Blockchain
public java.util.List<BlockImpl> getBlocksAfter(long blockId, int limit)
getBlocksAfter
in interface Blockchain
public java.util.List<BlockImpl> getBlocksAfter(long blockId, java.util.List<java.lang.Long> blockList)
getBlocksAfter
in interface Blockchain
public long getBlockIdAtHeight(int height)
getBlockIdAtHeight
in interface Blockchain
public BlockImpl getBlockAtHeight(int height)
getBlockAtHeight
in interface Blockchain
public BlockImpl getECBlock(int timestamp)
getECBlock
in interface Blockchain
public TransactionImpl getTransaction(Chain chain, byte[] fullHash)
getTransaction
in interface Blockchain
public boolean hasTransaction(Chain chain, byte[] fullHash)
hasTransaction
in interface Blockchain
public FxtTransactionImpl getFxtTransaction(long transactionId)
getFxtTransaction
in interface Blockchain
public boolean hasFxtTransaction(long transactionId)
hasFxtTransaction
in interface Blockchain
public int getTransactionCount(Chain chain)
getTransactionCount
in interface Blockchain
public DbIterator<ChildTransactionImpl> getTransactions(ChildChain childChain, long accountId, byte type, byte subtype, int blockTimestamp, boolean includeExpiredPrunable)
getTransactions
in interface Blockchain
public 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 Blockchain
public DbIterator<ChildTransactionImpl> getReferencingTransactions(ChildChain childChain, byte[] referencedTransactionFullHash, int from, int to)
getReferencingTransactions
in interface Blockchain
public DbIterator<? extends FxtTransaction> getTransactions(FxtChain chain, long accountId, int numberOfConfirmations, byte type, byte subtype, int blockTimestamp, int from, int to)
getTransactions
in interface Blockchain
public DbIterator<FxtTransactionImpl> getTransactions(FxtChain chain, java.sql.Connection con, java.sql.PreparedStatement pstmt)
getTransactions
in interface Blockchain
public DbIterator<ChildTransactionImpl> getTransactions(ChildChain childChain, java.sql.Connection con, java.sql.PreparedStatement pstmt)
getTransactions
in interface Blockchain
public java.util.List<Transaction> getExpectedTransactions(Filter<Transaction> filter)
getExpectedTransactions
in interface Blockchain
public 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