Class TkmInterferenceGraph
- java.lang.Object
-
- com.h2tcoin.takamakachain.utils.threadSafeUtils.TkmInterferenceGraph
-
public class TkmInterferenceGraph extends Object
- Author:
- giovanni.antino@h2tcoin.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTkmInterferenceGraph.GraphBeaninternal class for interference management
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCurrentListStatus()reset the internal status of the singleton deleting current calculated interference list.Map<Integer,ConcurrentSkipListSet<TransactionBox>>convertToNonInterfernceList(List<Set<TransactionBox>> intListGr)convert interference list to sorted non interfenece list.Map<String,TkmInterferenceGraph.GraphBean>getGHM()Map<String,Integer>getIntList()List<Set<TransactionBox>>getIntListGr()returns the list of transactions grouped in interference setsMap<Integer,ConcurrentSkipListSet<TransactionBox>>getSortedNonInterferenceList()static TkmInterferenceGraphi()voidinsert(TransactionBox tbox)add a TransactionBox to the singletonvoidinsert(TransactionBox[] tboxArray)add a TransactionBox Array to the singletonvoidresetInstance()clear the internal status of the singleton.voidupdateIntList()using loaded transaction generate new interference list
-
-
-
Method Detail
-
resetInstance
public void resetInstance()
clear the internal status of the singleton. Removes all transactions saved in the object
-
i
public static final TkmInterferenceGraph i()
-
clearCurrentListStatus
public void clearCurrentListStatus()
reset the internal status of the singleton deleting current calculated interference list. UseresetInstance()to full clear the node removing the transactions
-
insert
public void insert(TransactionBox tbox) throws TransactionOutOfContextException, TransactionNotYetImplementedException
add a TransactionBox to the singleton- Parameters:
tbox-- Throws:
TransactionOutOfContextExceptionTransactionNotYetImplementedException
-
insert
public void insert(TransactionBox[] tboxArray)
add a TransactionBox Array to the singleton- Parameters:
tboxArray-
-
updateIntList
public void updateIntList()
using loaded transaction generate new interference list
-
getIntListGr
public List<Set<TransactionBox>> getIntListGr()
returns the list of transactions grouped in interference sets- Returns:
-
convertToNonInterfernceList
public Map<Integer,ConcurrentSkipListSet<TransactionBox>> convertToNonInterfernceList(List<Set<TransactionBox>> intListGr)
convert interference list to sorted non interfenece list.- Parameters:
intListGr-- Returns:
-
getSortedNonInterferenceList
public Map<Integer,ConcurrentSkipListSet<TransactionBox>> getSortedNonInterferenceList()
-
getGHM
public Map<String,TkmInterferenceGraph.GraphBean> getGHM()
-
-