Commit b784ee92 authored by David Feliot's avatar David Feliot
Browse files

Getter added for operations count.

parent 701813aa
......@@ -529,4 +529,13 @@ public abstract class AbstractTransaction extends BaseTransaction {
public boolean containsOperations() {
return (perThreadContext.get().getLog().size() > 0);
}
/**
* Returns the number of operations to be committed.
* @return the number of operations to be committed.
*/
public int getOperationCount() {
return perThreadContext.get().getLog().size();
}
}
......@@ -482,4 +482,13 @@ public final class JTransaction extends BaseTransaction implements JTransactionM
public boolean containsOperations() {
return log.size() > 0;
}
/**
* Returns the number of operations to be committed.
* @return the number of operations to be committed.
*/
public int getOperationCount() {
return log.size();
}
}
......@@ -207,4 +207,13 @@ public final class NullTransaction extends BaseTransaction implements NullTransa
public boolean containsOperations() {
return false;
}
/**
* Returns the number of operations to be committed.
* @return the number of operations to be committed.
*/
public int getOperationCount() {
return 0;
}
}
......@@ -292,4 +292,10 @@ public interface Transaction {
*/
boolean containsOperations();
/**
* Returns the number of operations to be committed.
* @return the number of operations to be committed.
*/
int getOperationCount();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment