Mercurial > hg > Database > Alice
changeset 313:4b99234c88d4
add init method for ids.
author | sugi |
---|---|
date | Tue, 03 Dec 2013 21:34:42 +0900 |
parents | 6e0a3c680b82 |
children | f1f0638861ab |
files | src/alice/codesegment/CodeSegment.java src/alice/codesegment/InputDataSegment.java |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/codesegment/CodeSegment.java Tue Nov 26 18:20:18 2013 +0900 +++ b/src/alice/codesegment/CodeSegment.java Tue Dec 03 21:34:42 2013 +0900 @@ -16,6 +16,7 @@ } public void recycle(){ + ids.initCounter(); ids.setCounter(list.size()); for (Receiver receiver : list) { ids.recommand(receiver);
--- a/src/alice/codesegment/InputDataSegment.java Tue Nov 26 18:20:18 2013 +0900 +++ b/src/alice/codesegment/InputDataSegment.java Tue Dec 03 21:34:42 2013 +0900 @@ -24,6 +24,11 @@ this.cs = cs; } + public void initCounter(){ + count = new AtomicInteger(1); + keyCount = new AtomicInteger(0); + } + public void quickPeek(Receiver receiver) { cs.list.add(receiver); if (receiver.managerKey==null){