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 class
TkmInterferenceGraph.GraphBean
internal class for interference management
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCurrentListStatus()
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 TkmInterferenceGraph
i()
void
insert(TransactionBox tbox)
add a TransactionBox to the singletonvoid
insert(TransactionBox[] tboxArray)
add a TransactionBox Array to the singletonvoid
resetInstance()
clear the internal status of the singleton.void
updateIntList()
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:
TransactionOutOfContextException
TransactionNotYetImplementedException
-
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()
-
-