public class DataBase extends Base
All the data is binded once, note that adding or rebinding data in here is expensive. Use ClusterMatrix for a dynamic
database.
clusters,
times, transactions
| Constructor and Description |
|---|
DataBase(Input inputObj,
Input inputTime)
Initialises the database following the configurations in the
files
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
initClusterAndTransaction()
Initiates the Cluster and Transactions HashMap, linking each
other.
|
protected void |
initTimeAndCluster()
Initializes the link between Time and Cluster
to be used after
initClusterAndTransaction()
|
java.lang.String |
printGetClusterTransactions(int index)
|
javax.json.JsonObjectBuilder |
toJson()
|
java.lang.String |
toPrettyString()
Displays a prettified version of
Object.toString()
It's used as display by Debug if
it's implemented.
|
add,
add,
add,
areTransactionsInCluster,
getCluster,
getClusterIds,
getClusters,
getClusterTimeId,
getClusterTransactions,
getFilteredTransactionIdsIfHaveCluster,
getOrCreateCluster,
getOrCreateTime,
getOrCreateTransaction,
getTime,
getTimeIds,
getTimes,
getTransaction,
getTransactionClusters,
getTransactionIds,
getTransactions,
toString
public DataBase(Input inputObj, Input inputTime) throws java.io.IOException, ClusterNotExistException, MalformedTimeIndexException
inputObj - file (transactionId [clusterId ...])inputTime - file (timeId clusterId)java.io.IOException - if inputObj or inputTime is incorrectClusterNotExistException
- if the cluster doesn't exist
MalformedTimeIndexException
protected void initClusterAndTransaction()
throws java.io.IOException
java.io.IOException - if the input file is incorrectDataBase(Input,
Input)protected void initTimeAndCluster()
throws java.io.IOException,
ClusterNotExistException,
MalformedTimeIndexException
to be used after initClusterAndTransaction()
java.io.IOException - if the inputTime file is incorrectClusterNotExistException
- if the cluster does not exist
MalformedTimeIndexException
- if there is more clusters on the same timeline
DataBase(Input,
Input),
initClusterAndTransaction()
public java.lang.String printGetClusterTransactions(int index)
index - = id du clusterpublic javax.json.JsonObjectBuilder toJson()
public java.lang.String toPrettyString()
PrettyPrint
Object.toString()
It's used as display by Debug if it's
implemented.
toPrettyString in
interface PrettyPrint
toPrettyString in
class Base
Object.toString()