EMMA Coverage Report (generated Sun May 02 20:42:29 CEST 2010)
[all classes][hu.netmind.beankeeper.lock]

COVERAGE SUMMARY FOR SOURCE FILE [ConcurrentModificationException.java]

nameclass, %method, %block, %line, %
ConcurrentModificationException.java100% (1/1)50%  (2/4)48%  (13/27)50%  (5/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ConcurrentModificationException100% (1/1)50%  (2/4)48%  (13/27)50%  (5/10)
ConcurrentModificationException (SessionInfo, Object [], String, Throwable): ... 0%   (0/1)0%   (0/11)0%   (0/4)
getObjects (): Object [] 0%   (0/1)0%   (0/3)0%   (0/1)
ConcurrentModificationException (SessionInfo, Object [], String): void 100% (1/1)100% (10/10)100% (4/4)
getSessionInfo (): SessionInfo 100% (1/1)100% (3/3)100% (1/1)

1/**
2 * Copyright (C) 2006 NetMind Consulting Bt.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 
19package hu.netmind.beankeeper.lock;
20 
21import hu.netmind.beankeeper.common.StoreException;
22 
23/**
24 * Exception is thrown, if an object is about to be saved in a transaction,
25 * but the same object (or another representation of the same data) is under
26 * modification in another thread. This exception is also thrown if one
27 * of the objects is already locked.
28 * @author Brautigam Robert
29 * @version Revision: $Revision$
30 */
31public class ConcurrentModificationException extends StoreException
32{
33   private SessionInfo sessionInfo;
34   private Object[] objs;
35   
36   public ConcurrentModificationException(SessionInfo sessionInfo, Object[] objs, String message)
37   {
38      super(message);
39      this.sessionInfo=sessionInfo;
40      this.objs=objs;
41   }
42 
43   public ConcurrentModificationException(SessionInfo sessionInfo, Object[] objs, String message, Throwable cause)
44   {
45      super(message,cause);
46      this.sessionInfo=sessionInfo;
47      this.objs=objs;
48   }
49 
50   /**
51    * Returns the object which could not be modified.
52    */
53   public Object[] getObjects()
54   {
55      return objs;
56   }
57 
58   /**
59    * Returns the transaction which currently locks the object that could
60    * not be modified.
61    */
62   public SessionInfo getSessionInfo()
63   {
64      return sessionInfo;
65   }
66}
67 

[all classes][hu.netmind.beankeeper.lock]
EMMA 2.0.5312debian (C) Vladimir Roubtsov