List of usage examples for java.util ConcurrentModificationException ConcurrentModificationException
public ConcurrentModificationException()
From source file:org.apache.mahout.common.cache.LFUCache.java
private void incrementHit(K key, long count) { Set<K> keys = evictionMap.get(count); if (keys == null) { throw new ConcurrentModificationException(); }/*w ww.j a v a2 s. c o m*/ if (keys.remove(key) == false) { throw new ConcurrentModificationException(); } if (keys.isEmpty()) { evictionMap.remove(count); } count++; Set<K> keysNew = evictionMap.get(count); if (keysNew == null) { keysNew = new LinkedHashSet<K>(); evictionMap.put(count, keysNew); } keysNew.add(key); }
From source file:jp.co.nemuzuka.service.impl.KindServiceImpl.java
@Override public void put(KindForm form, String projectKeyString) { KindModel model = null;//from ww w . j av a 2 s .c om Long version = ConvertUtils.toLong(form.versionNo); if (version != null) { //?? //version?Key?? Key key = Datastore.stringToKey(form.keyToString); model = kindDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new KindModel(); //Key?Key? Key key = Datastore.createKey(KindModel.class, projectKeyString); model.setKey(key); } setModel(model, form); kindDao.put(model); }
From source file:jp.co.nemuzuka.service.impl.StatusServiceImpl.java
@Override public void put(StatusForm form, String projectKeyString) { StatusModel model = null;//from www . ja v a 2s .c o m Long version = ConvertUtils.toLong(form.versionNo); if (version != null) { //?? //version?Key?? Key key = Datastore.stringToKey(form.keyToString); model = statusDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new StatusModel(); //Key?Key? Key key = Datastore.createKey(StatusModel.class, projectKeyString); model.setKey(key); } setModel(model, form); statusDao.put(model); }
From source file:jp.co.nemuzuka.service.impl.VersionServiceImpl.java
@Override public void put(VersionForm form, String projectKeyString) { VersionModel model = null;//from ww w. ja v a 2 s .com Long version = ConvertUtils.toLong(form.versionNo); if (version != null) { //?? //version?Key?? Key key = Datastore.stringToKey(form.keyToString); model = versionDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new VersionModel(); //Key?Key? Key key = Datastore.createKey(VersionModel.class, projectKeyString); model.setKey(key); } setModel(model, form); versionDao.put(model); }
From source file:jp.co.nemuzuka.service.impl.CategoryServiceImpl.java
@Override public void put(CategoryForm form, String projectKeyString) { CategoryModel model = null;/*w w w . j a va 2 s . c o m*/ Long version = ConvertUtils.toLong(form.versionNo); if (version != null) { //?? //version?Key?? Key key = Datastore.stringToKey(form.keyToString); model = categoryDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new CategoryModel(); //Key?Key? Key key = Datastore.createKey(CategoryModel.class, projectKeyString); model.setKey(key); } setModel(model, form); categoryDao.put(model); }
From source file:jp.co.nemuzuka.service.impl.PriorityServiceImpl.java
@Override public void put(PriorityForm form, String projectKeyString) { PriorityModel model = null;/*from www .ja v a2s . c o m*/ Long version = ConvertUtils.toLong(form.versionNo); if (version != null) { //?? //version?Key?? Key key = Datastore.stringToKey(form.keyToString); model = priorityDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new PriorityModel(); //Key?Key? Key key = Datastore.createKey(PriorityModel.class, projectKeyString); model.setKey(key); } setModel(model, form); priorityDao.put(model); }
From source file:jp.co.nemuzuka.service.impl.MilestoneServiceImpl.java
@Override public void put(MilestoneForm form, String projectKeyToString) { MilestoneModel model = null;/*from w ww. j a va 2s . com*/ if (StringUtils.isNotEmpty(form.keyToString)) { //?? Key key = Datastore.stringToKey(form.keyToString); Long version = ConvertUtils.toLong(form.versionNo); //version?Key?projectKey?? model = milestoneDao.get(key, version, projectKeyToString); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new MilestoneModel(); } setModel(model, form, projectKeyToString); milestoneDao.put(model); }
From source file:org.itstechupnorth.walrus.base.ArticleBuffer.java
public ArticleBuffer title(char[] ch, int start, int length) { if (saving)/*from www . j ava 2 s . co m*/ throw new ConcurrentModificationException(); title.append(ch, start, length); return this; }
From source file:org.itstechupnorth.walrus.base.ArticleBuffer.java
public ArticleBuffer text(char[] ch, int start, int length) throws BufferOverflowException { if (saving)//from ww w . j a v a 2 s . c o m throw new ConcurrentModificationException(); // System.out.println(moniker() + "text@" + buffer.position()); buffer.put(ch, start, length); return this; }
From source file:jp.co.nemuzuka.service.impl.ProjectServiceImpl.java
@Override public void put(ProjectForm form) { ProjectModel model = null;/*from w w w . jav a 2 s . c o m*/ boolean isAdd = false; if (StringUtils.isNotEmpty(form.keyToString)) { //?? Key key = Datastore.stringToKey(form.keyToString); Long version = ConvertUtils.toLong(form.versionNo); //version?Key?? model = projectDao.get(key, version); if (model == null) { //??????Exceptionthrow throw new ConcurrentModificationException(); } } else { //??? model = new ProjectModel(); isAdd = true; } setModel(model, form); projectDao.put(model); //?????????? if (isAdd) { addProjectMember4Admin(model.getKey(), form.adminMemberId); } }