Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into 1.7.10
This commit is contained in:
@@ -25,6 +25,7 @@ public class StorageInterestManager {
|
|||||||
|
|
||||||
private final SetMultimap<IAEStack, ItemWatcher> container;
|
private final SetMultimap<IAEStack, ItemWatcher> container;
|
||||||
private LinkedList<SavedTransactions> transactions = null;
|
private LinkedList<SavedTransactions> transactions = null;
|
||||||
|
private int transDepth=0;
|
||||||
|
|
||||||
public StorageInterestManager(SetMultimap<IAEStack, ItemWatcher> interests) {
|
public StorageInterestManager(SetMultimap<IAEStack, ItemWatcher> interests) {
|
||||||
container = interests;
|
container = interests;
|
||||||
@@ -32,10 +33,17 @@ public class StorageInterestManager {
|
|||||||
|
|
||||||
public void enableTransactions()
|
public void enableTransactions()
|
||||||
{
|
{
|
||||||
|
if ( transDepth == 0 )
|
||||||
transactions = new LinkedList();
|
transactions = new LinkedList();
|
||||||
|
|
||||||
|
transDepth++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disableTransactions()
|
public void disableTransactions()
|
||||||
|
{
|
||||||
|
transDepth--;
|
||||||
|
|
||||||
|
if ( transDepth == 0 )
|
||||||
{
|
{
|
||||||
LinkedList<SavedTransactions> myActions = transactions;
|
LinkedList<SavedTransactions> myActions = transactions;
|
||||||
transactions = null;
|
transactions = null;
|
||||||
@@ -48,6 +56,7 @@ public class StorageInterestManager {
|
|||||||
remove( t.stack, t.iw );
|
remove( t.stack, t.iw );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean containsKey( IAEStack stack )
|
public boolean containsKey( IAEStack stack )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user