joafip-svn Mailing List for java data object persistence in file (Page 16)
Brought to you by:
luc_peuvrier
You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(102) |
Nov
(52) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(4) |
Feb
|
Mar
(14) |
Apr
(116) |
May
(100) |
Jun
(14) |
Jul
|
Aug
|
Sep
(30) |
Oct
|
Nov
(108) |
Dec
(2) |
|
From: <luc...@us...> - 2012-03-03 02:24:53
|
Revision: 2992
http://joafip.svn.sourceforge.net/joafip/?rev=2992&view=rev
Author: luc_peuvrier
Date: 2012-03-03 02:24:47 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
joafip-pmap project added
Modified Paths:
--------------
trunk/joafip-parent/pom.xml
Property Changed:
----------------
trunk/joafip-pmap/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 02:23:50
|
Revision: 2991
http://joafip.svn.sourceforge.net/joafip/?rev=2991&view=rev
Author: luc_peuvrier
Date: 2012-03-03 02:23:44 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
empty project
Added Paths:
-----------
trunk/joafip-pmap/pom.xml
trunk/joafip-pmap/src/
trunk/joafip-pmap/src/main/
trunk/joafip-pmap/src/main/java/
trunk/joafip-pmap/src/main/resources/
trunk/joafip-pmap/src/test/
trunk/joafip-pmap/src/test/java/
trunk/joafip-pmap/src/test/resources/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 02:23:50
|
Revision: 2991
http://joafip.svn.sourceforge.net/joafip/?rev=2991&view=rev
Author: luc_peuvrier
Date: 2012-03-03 02:23:44 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
empty project
Added Paths:
-----------
trunk/joafip-pmap/pom.xml
trunk/joafip-pmap/src/
trunk/joafip-pmap/src/main/
trunk/joafip-pmap/src/main/java/
trunk/joafip-pmap/src/main/resources/
trunk/joafip-pmap/src/test/
trunk/joafip-pmap/src/test/java/
trunk/joafip-pmap/src/test/resources/
Added: trunk/joafip-pmap/pom.xml
===================================================================
--- trunk/joafip-pmap/pom.xml (rev 0)
+++ trunk/joafip-pmap/pom.xml 2012-03-03 02:23:44 UTC (rev 2991)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-parent</artifactId>
+ <version>1.0.0</version>
+ <relativePath>../joafip-parent</relativePath>
+ </parent>
+ <!-- <groupId>net.sf.joafip</groupId> -->
+ <artifactId>joafip-pmap</artifactId>
+ <packaging>jar</packaging>
+ <version>4.0.0b8</version>
+ <url>http://joafip.sourceforge.net/</url>
+ <name>Joafip map in file</name>
+
+ <!-- <sourceDirectory>src_maven/main/java</sourceDirectory> <testSourceDirectory>src_maven/test/java</testSourceDirectory>
+ <resources><resource><directory>src_maven/main/resource</directory></resource></resources> -->
+
+ <dependencies>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-common</artifactId>
+ <version>4.0.0b8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-common</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-heapfile</artifactId>
+ <version>4.0.0b8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-log4j</artifactId>
+ <version>4.0.0b8</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 02:22:24
|
Revision: 2990
http://joafip.svn.sourceforge.net/joafip/?rev=2990&view=rev
Author: luc_peuvrier
Date: 2012-03-03 02:22:18 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
Initial import.
Added Paths:
-----------
trunk/joafip-pmap/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 02:22:24
|
Revision: 2990
http://joafip.svn.sourceforge.net/joafip/?rev=2990&view=rev
Author: luc_peuvrier
Date: 2012-03-03 02:22:18 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
Initial import.
Added Paths:
-----------
trunk/joafip-pmap/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 01:42:06
|
Revision: 2989
http://joafip.svn.sourceforge.net/joafip/?rev=2989&view=rev
Author: luc_peuvrier
Date: 2012-03-03 01:42:00 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
todo update
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 01:42:06
|
Revision: 2989
http://joafip.svn.sourceforge.net/joafip/?rev=2989&view=rev
Author: luc_peuvrier
Date: 2012-03-03 01:42:00 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
todo update
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
Modified: trunk/joafip/doc/_todo.txt
===================================================================
--- trunk/joafip/doc/_todo.txt 2012-03-03 01:35:51 UTC (rev 2988)
+++ trunk/joafip/doc/_todo.txt 2012-03-03 01:42:00 UTC (rev 2989)
@@ -28,6 +28,7 @@
-- check field access constraints, direct field access disallow to force use of getter and/or setter
-- check private method invocation of other instance
- static field persistence feature removed because a non sense
+- heap file project make able to create a map in file with a comparable key
minor changes:
- added search last in red black tree manager
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 01:35:58
|
Revision: 2988
http://joafip.svn.sourceforge.net/joafip/?rev=2988&view=rev
Author: luc_peuvrier
Date: 2012-03-03 01:35:51 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
heap file can be use with a comparable key, map in file
Modified Paths:
--------------
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IHeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/TestIdNode.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestStoreRestore.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/DualWrapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapFileCheckerDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMemoryDataManagerMock.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMultiFileDataManager.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/heapfile/service/HeapFileServiceTests.java
Added Paths:
-----------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/IDataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/NullDataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractDataRecordKeyComparator.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/DataRecordKeyManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
Modified: trunk/joafip-heapfile/pom.xml
===================================================================
--- trunk/joafip-heapfile/pom.xml 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/pom.xml 2012-03-03 01:35:51 UTC (rev 2988)
@@ -27,6 +27,14 @@
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-common</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-file</artifactId>
<version>4.0.0b8</version>
</dependency>
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -19,6 +19,8 @@
import java.io.Serializable;
import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.heapfile.service.HeapException;
+import net.sf.joafip.heapfile.service.HeapRuntimeException;
/**
*
@@ -37,10 +39,12 @@
public static final DataRecordIdentifier ZERO = new DataRecordIdentifier();
public static final DataRecordIdentifier LAST = new DataRecordIdentifier(
- Long.MIN_VALUE);
+ Long.MAX_VALUE);
public final long value;
+ private final IDataRecordKey dataRecordKey;
+
/**
* create the first data record identifier: #0
*
@@ -48,6 +52,7 @@
public DataRecordIdentifier() {
super();
this.value = 0;
+ this.dataRecordKey = NullDataRecordKey.getInstance();
}
/**
@@ -60,6 +65,7 @@
public DataRecordIdentifier(final int value) {
super();
this.value = value;
+ this.dataRecordKey = NullDataRecordKey.getInstance();
}
/**
@@ -71,6 +77,7 @@
public DataRecordIdentifier(final long long1) {
super();
this.value = long1;
+ this.dataRecordKey = NullDataRecordKey.getInstance();
}
/**
@@ -82,12 +89,31 @@
public DataRecordIdentifier(final DataRecordIdentifier dataRecordIdentifier) {
super();
this.value = dataRecordIdentifier.value + 1;
+ this.dataRecordKey = NullDataRecordKey.getInstance();
}
// public long getValue() {
// return value;
// }
+ public DataRecordIdentifier(final IDataRecordKey dataRecordKey) {
+ super();
+ this.value = -1;
+ this.dataRecordKey = dataRecordKey;
+ }
+
+ public IDataRecordKey getDataRecordKey() {
+ return dataRecordKey;
+ }
+
+ public int getKeyDataSize() {
+ return dataRecordKey.getKeyDataSize();
+ }
+
+ public byte[] getKeyData() {
+ return dataRecordKey.getKeyData();
+ }
+
public int compareTo(final DataRecordIdentifier dataRecordIdentifier) {
final int compareTo;
final long otherLong1 = dataRecordIdentifier.value;
@@ -96,14 +122,19 @@
} else if (value > otherLong1) {
compareTo = 1;
} else {
- compareTo = 0;
+ try {
+ compareTo = dataRecordKey
+ .compareTo(dataRecordIdentifier.dataRecordKey);
+ } catch (HeapException exception) {
+ throw new HeapRuntimeException(exception);
+ }
}
return compareTo;
}
@Override
public int hashCode() {
- return (int) (value ^ (value >>> 32));
+ return (int) (value ^ (value >>> 32)) + dataRecordKey.getKeyHashcode();
}
@Override
@@ -117,7 +148,12 @@
* if (!(obj instanceof DataRecordIdentifier)) return false;
*/
final DataRecordIdentifier other = (DataRecordIdentifier) obj;
- return value == other.value;
+ try {
+ return value == other.value
+ && dataRecordKey.compareTo(other.dataRecordKey) == 0;
+ } catch (HeapException exception) {
+ throw new HeapRuntimeException(exception);
+ }
// if (value != other.value)
// return false;
// return true;
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.entity;
+
+import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
+import net.sf.joafip.heapfile.service.HeapException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+public class DataRecordKey implements IDataRecordKey {
+
+ private final IDataRecordKeyComparator comparator;
+
+ private final byte[] data;
+
+ private transient Object key;
+
+ public DataRecordKey(final IDataRecordKeyComparator comparator,
+ final byte[] data) {// NOPMD
+ super();
+ this.comparator = comparator;
+ this.data = data;
+ }
+
+ @Override
+ public int getKeyHashcode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(final IDataRecordKey dataRecordKey)
+ throws HeapException {
+ return comparator.compareDataRecordKey(this, dataRecordKey);
+ }
+
+ @Override
+ public int getKeyDataSize() {
+ return data.length;
+ }
+
+ @Override
+ public byte[] getKeyData() {
+ return data; // NOPMD
+ }
+
+ @Override
+ public Object getKey() {
+ return key;
+ }
+
+ @Override
+ public void setKey(final Object key) {
+ this.key = key;
+ }
+}
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -102,12 +102,6 @@
*/
private boolean freeRecord;// NOPMD
- /** node identification tree root node, may be null for free record */
- // private HeapIdNode idNode;
-
- /** free area tree root node, may be null for data record */
- // private HeapFreeNode freeNode;
-
private DataRecordIdentifier nodeIdentifier;
/** position in heap file of this node parent */
@@ -157,7 +151,7 @@
/**
* construction for node creation, it is a data record, not free should be
- * only used bye {@link HeapElementManager}<br>
+ * only used by {@link HeapElementManager}<br>
*
* @param heapElementManager
* heap header and record manager in heap file
@@ -192,7 +186,8 @@
* dataAssociatedSize + 4 : +4 for crc32
*/
// ASSERTX
- assert assertAreaSizeForData(freeRecord, dataAssociatedSize, areaSize);
+ assert assertAreaSizeForData(freeRecord, nodeIdentifier,
+ dataAssociatedSize, areaSize);
this.areaSize = areaSize;
// if (freeRecord) {
// freeNode = new HeapFreeNode(heapElementManager, positionInFile,
@@ -208,10 +203,14 @@
}
private boolean assertAreaSizeForData(final boolean freeRecord,
+ final DataRecordIdentifier nodeIdentifier,
final Integer dataAssociatedSize, final Integer areaSize)
throws HeapException {
- if (!freeRecord && areaSize != null
- && areaSize < MAX_RECORD_HEADER_SIZE + dataAssociatedSize + 4) {
+ if (!freeRecord
+ && areaSize != null
+ && areaSize < MAX_RECORD_HEADER_SIZE
+ + nodeIdentifier.getKeyDataSize() + dataAssociatedSize
+ + 4) {
logger.fatal(AREA_SIZE_TO_SMALL_FOR_DATA);
throw new HeapException(new HeapException(
AREA_SIZE_TO_SMALL_FOR_DATA));
@@ -410,15 +409,10 @@
private void marshallDataRecord() throws HeapException {
updateIdNodeData();
writeInteger(dataAssociatedSize);
- // writeLong(idNode.getParentPositionInFile());
writeLong(parentPositionInFile);
- // writeLong(idNode.getLeftPositionInFile());
writeLong(leftPositionInFile);
- // writeLong(idNode.getRightPositionInFile());
writeLong(rightPositionInFile);
- // if (idNode.isColorSetted()) {
if (colorSetted) {
- // if (idNode.getColor()) {
if (color) {
writeByte((byte) 0x03);
} else {
@@ -427,10 +421,13 @@
} else {
writeByte((byte) 0x00);
}
- // writeInteger(idNode.getNumberOfChild());
writeInteger(numberOfChild);
- // writeLong(idNode.getElement().value);// write node identifier
writeLong(nodeIdentifier.value);
+ final byte[] keyData = nodeIdentifier.getKeyData();
+ if (keyData != null) {
+ writeInteger(keyData.length);
+ writeBytes(keyData);
+ }
writeCrc32();
if (dataValueChanged) {
clearCrc32();
@@ -535,30 +532,30 @@
dataAssociatedSize = readInteger();
// ASSERTX
assert dataAssociatedSize >= 0 : ASSOCIATED_DATA_SIZE_MUST_BE_DEFINED;
- // idNode.setParentPositionInFile(readLong());
parentPositionInFile = readLong();
- // idNode.setLeftPositionInFile(readLong());
leftPositionInFile = readLong();
- // idNode.setRightPositionInFile(readLong());
rightPositionInFile = readLong();
final byte colorCode = readByte();
if (colorCode == 0x02) {
- // idNode.setColorUnmarshalling(false);
colorSetted = true;
color = false;
} else if (colorCode == 0x03) {
- // idNode.setColorUnmarshalling(true);
colorSetted = true;
color = true;
} else {
colorSetted = false;
}
- // idNode.setNumberOfChildUnmarshalling(readInteger());
numberOfChild = readInteger();
final long long1 = readLong();
- // idNode.setNodeIdentifier(new DataRecordIdentifier(long1));
- nodeIdentifier = new DataRecordIdentifier(long1);
- // idNode.valueSetted();
+ if (long1 == -1) {
+ final int keySize = readInteger();
+ final byte[] keyData = readBytes(keySize);
+ final IDataRecordKey dataRecordKey = new DataRecordKey(
+ heapElementManager.getDataRecordKeyComparator(), keyData);
+ nodeIdentifier = new DataRecordIdentifier(dataRecordKey);
+ } else {
+ nodeIdentifier = new DataRecordIdentifier(long1);
+ }
readAndCheckCrc32();
}
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/IDataRecordKey.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/IDataRecordKey.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/IDataRecordKey.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.entity;
+
+import net.sf.joafip.heapfile.service.HeapException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public interface IDataRecordKey {
+
+ int getKeyHashcode();
+
+ int compareTo(IDataRecordKey dataRecordKey) throws HeapException;
+
+ int getKeyDataSize();
+
+ byte[] getKeyData();
+
+ Object getKey();
+
+ void setKey(Object key);
+}
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/NullDataRecordKey.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/NullDataRecordKey.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/NullDataRecordKey.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.entity;
+
+import java.io.Serializable;
+
+import net.sf.joafip.NotStorableClass;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+public final class NullDataRecordKey implements IDataRecordKey, Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6437312314493430699L;
+
+ private final static NullDataRecordKey INSTANCE = new NullDataRecordKey();
+
+ public static NullDataRecordKey getInstance() {
+ return INSTANCE;
+ }
+
+ private NullDataRecordKey() {
+ super();
+ }
+
+ @Override
+ public int getKeyHashcode() {
+ return 0;
+ }
+
+ @Override
+ public int compareTo(final IDataRecordKey dataRecordKey) {
+ return 0;
+ }
+
+ @Override
+ public int getKeyDataSize() {
+ return 0;
+ }
+
+ @Override
+ public byte[] getKeyData() { // NOPMD
+ return null;
+ }
+
+ @Override
+ public Object getKey() {
+ // no implementation
+ return null;
+ }
+
+ @Override
+ public void setKey(final Object key) {
+ // no implementation
+ }
+}
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractDataRecordKeyComparator.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractDataRecordKeyComparator.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractDataRecordKeyComparator.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.service;
+
+import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.heapfile.record.entity.IDataRecordKey;
+import net.sf.joafip.heapfile.service.HeapException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ * @param <K>
+ */
+@NotStorableClass
+public abstract class AbstractDataRecordKeyComparator<K extends Comparable<K>>
+ implements IDataRecordKeyComparator {
+
+ @Override
+ public int compareDataRecordKey(final IDataRecordKey dataRecordKey1,
+ final IDataRecordKey dataRecordKey2) throws HeapException {
+ final K key1 = getObject(dataRecordKey1);
+ final K key2 = getObject(dataRecordKey2);
+ return key1.compareTo(key2);
+ }
+
+ @SuppressWarnings("unchecked")
+ private K getObject(final IDataRecordKey dataRecordKey)
+ throws HeapException {
+ K key = (K) dataRecordKey.getKey();
+ if (key == null) {
+ key = unmarshall(dataRecordKey.getKeyData());
+ dataRecordKey.setKey(key);
+ }
+ return key;
+ }
+
+ protected abstract K unmarshall(byte[] keyData) throws HeapException;
+
+}
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/DataRecordKeyManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/DataRecordKeyManager.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/DataRecordKeyManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.service;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+
+import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.entity.DataRecordKey;
+import net.sf.joafip.heapfile.service.HeapException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+@SuppressWarnings("rawtypes")
+public final class DataRecordKeyManager extends AbstractDataRecordKeyComparator {
+
+ private static final DataRecordKeyManager INSTANCE = new DataRecordKeyManager();
+
+ public static DataRecordKeyManager getInstance() {
+ return INSTANCE;
+ }
+
+ private DataRecordKeyManager() {
+ super();
+ }
+
+ @Override
+ protected Comparable<?> unmarshall(final byte[] keyData)
+ throws HeapException {
+ try {
+ final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
+ keyData);
+ final ObjectInputStream objectInputStream = new ObjectInputStream(
+ byteArrayInputStream);
+ final Object result = objectInputStream.readObject();
+ objectInputStream.close();
+ return (Comparable<?>) result;
+ } catch (Exception exception) {
+ throw new HeapException("unmarshalling key", exception);
+ }
+ }
+
+ public DataRecordIdentifier createKey(final Object key)
+ throws HeapException {
+ try {
+ final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+ final ObjectOutputStream outputStream = new ObjectOutputStream(
+ byteArrayOutputStream);
+ outputStream.writeObject(key);
+ outputStream.close();
+ final byte[] keyData = byteArrayOutputStream.toByteArray();
+ final DataRecordKey dataRecordKey = new DataRecordKey(this, keyData);
+ dataRecordKey.setKey(key);
+ return new DataRecordIdentifier(dataRecordKey);
+ } catch (Exception exception) {
+ throw new HeapException("creating key", exception);
+ }
+ }
+}
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapElementManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapElementManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapElementManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -219,6 +219,8 @@
private final int fileOperationRetryMsDelay;
+ private IDataRecordKeyComparator dataRecordKeyComparator;
+
/**
* construction for crash safe mode disabled<br>
*
@@ -1186,4 +1188,15 @@
public HeapRecord getHeapFileRecordInWriteCache(final long positionInFile) {
return heapRecordToWriteMap.get(positionInFile);
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ this.dataRecordKeyComparator = dataRecordKeyComparator;
+ }
+
+ @Override
+ public IDataRecordKeyComparator getDataRecordKeyComparator() {
+ return dataRecordKeyComparator;
+ }
}
Added: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java (rev 0)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.record.service;
+
+import net.sf.joafip.heapfile.record.entity.IDataRecordKey;
+import net.sf.joafip.heapfile.service.HeapException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public interface IDataRecordKeyComparator {
+
+ int compareDataRecordKey(IDataRecordKey dataRecordKey1,
+ IDataRecordKey dataRecordKey2) throws HeapException;
+}
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IHeapElementManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IHeapElementManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IHeapElementManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -207,4 +207,9 @@
long getFileSize() throws HeapException;
int getNumberOfHeaprecordInMemory();
+
+ void setDataRecordKeyComparator(
+ IDataRecordKeyComparator dataRecordKeyComparator);
+
+ IDataRecordKeyComparator getDataRecordKeyComparator();
}
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -37,6 +37,7 @@
import net.sf.joafip.heapfile.record.service.HeapElementManager;
import net.sf.joafip.heapfile.record.service.HeapFreeNodeManager;
import net.sf.joafip.heapfile.record.service.HeapIdNodeManager;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
import net.sf.joafip.heapfile.record.service.IHeapElementManager;
import net.sf.joafip.redblacktree.entity.IRBTNode;
import net.sf.joafip.redblacktree.service.IRBTVisitor;
@@ -283,10 +284,12 @@
/* 4 byte added for crc32 on data added at end of data */
if (neededDataSize < MINIMUM_RECORD_DATA_SIZE) {
neededAreaSize = 4 + MINIMUM_RECORD_DATA_SIZE
- + HeapRecord.MAX_RECORD_HEADER_SIZE;
+ + HeapRecord.MAX_RECORD_HEADER_SIZE
+ + dataRecordKeyDataSize(nodeIdentifier);
} else {
neededAreaSize = 4 + neededDataSize
- + HeapRecord.MAX_RECORD_HEADER_SIZE;
+ + HeapRecord.MAX_RECORD_HEADER_SIZE
+ + dataRecordKeyDataSize(nodeIdentifier);
}
final HeapRecord heapRecord;
@@ -311,6 +314,18 @@
return heapRecord;
}
+ private int dataRecordKeyDataSize(final DataRecordIdentifier nodeIdentifier) {
+ final int keyDataSize = nodeIdentifier.getKeyDataSize();
+ final int dataRecordKeyDataSize;
+ if (keyDataSize == 0) {
+ dataRecordKeyDataSize = 0;
+ } else {
+ // add 4 for integer containing key data size
+ dataRecordKeyDataSize = keyDataSize + 4;
+ }
+ return dataRecordKeyDataSize;
+ }
+
@Override
public boolean deleteDataRecordImpl(
final DataRecordIdentifier dataRecordIdentifier)
@@ -1109,6 +1124,12 @@
return new DataRecordIterator();
}
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ heapElementManager.setDataRecordKeyComparator(dataRecordKeyComparator);
+ }
+
/**
*
* @return last record in file position
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -21,6 +21,7 @@
import net.sf.joafip.Fortest;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
* data management on heap file<br>
@@ -292,4 +293,7 @@
@Fortest
long getLastRecordPositionInFile() throws HeapException;
+
+ void setDataRecordKeyComparator(
+ IDataRecordKeyComparator dataRecordKeyComparator);
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/TestIdNode.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/TestIdNode.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/TestIdNode.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -23,6 +23,7 @@
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.TestConstant;
import net.sf.joafip.TestException;
+import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
import net.sf.joafip.heapfile.record.entity.HeapHeader;
import net.sf.joafip.heapfile.record.entity.HeapIdNode;
import net.sf.joafip.heapfile.record.entity.HeapRecord;
@@ -88,8 +89,8 @@
final HeapRecord heapRecord = heapElementManager.newHeapFileRecord(
HeapHeader.HEAP_HEADER_SIZE,
-1/* previousRecordPositionInFile */,
- null/* nodeIdentification */, false/* freeRecord */,
- 0/* dataAssociatedSize */,
+ DataRecordIdentifier.ZERO/* nodeIdentification */,
+ false/* freeRecord */, 0/* dataAssociatedSize */,
HeapRecord.DATA_RECORD_HEADER_SIZE + 4/* areaSize */);
heapIdNode = new HeapIdNode(heapElementManager,
heapRecord.getPositionInFile(), -1, -1, -1, false, false, 0,
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestStoreRestore.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestStoreRestore.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestStoreRestore.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -330,4 +330,15 @@
public int getNumberOfHeaprecordInMemory() {
throw new UnsupportedOperationException("not implemented");
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ throw new UnsupportedOperationException("not implemented");
+ }
+
+ @Override
+ public IDataRecordKeyComparator getDataRecordKeyComparator() {
+ throw new UnsupportedOperationException("not implemented");
+ }
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -36,6 +36,7 @@
import net.sf.joafip.heapfile.entity.BlockDataManagerHeader;
import net.sf.joafip.heapfile.entity.DataBlock;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
*
@@ -490,4 +491,11 @@
header.setDataLength(length);
}
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ throw new UnsupportedOperationException(
+ "works only with long data record identifier");
+ }
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/DualWrapDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/DualWrapDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/DualWrapDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -27,6 +27,7 @@
import java.util.Set;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
*
@@ -277,4 +278,11 @@
public long getLastRecordPositionInFile() throws HeapException {
throw new HeapException("unsupported");
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ firstDataManager.setDataRecordKeyComparator(dataRecordKeyComparator);
+ secondDataManager.setDataRecordKeyComparator(dataRecordKeyComparator);
+ }
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapFileCheckerDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapFileCheckerDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapFileCheckerDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -23,6 +23,7 @@
import net.sf.joafip.heapfile.entity.HeapFileSetup;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
*
@@ -259,4 +260,11 @@
public long getLastRecordPositionInFile() throws HeapException {
throw new HeapException("unsupported");
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ throw new UnsupportedOperationException(
+ "works only with long data record identifier");
+ }
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMemoryDataManagerMock.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMemoryDataManagerMock.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMemoryDataManagerMock.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -27,6 +27,7 @@
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
* mock of heap data manager in memory for tests
@@ -302,4 +303,11 @@
public long getLastRecordPositionInFile() throws HeapException {
throw new HeapException(UNSUPPORTED);
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ throw new UnsupportedOperationException(
+ "works only with long data record identifier");
+ }
}
\ No newline at end of file
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMultiFileDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMultiFileDataManager.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMultiFileDataManager.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -31,6 +31,7 @@
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.IDataRecordKeyComparator;
/**
* Data management on heap multiple file implementation<br>
@@ -473,4 +474,11 @@
public long getLastRecordPositionInFile() throws HeapException {
throw new HeapException("unsupported");
}
+
+ @Override
+ public void setDataRecordKeyComparator(
+ final IDataRecordKeyComparator dataRecordKeyComparator) {
+ throw new UnsupportedOperationException(
+ "works only with long data record identifier");
+ }
}
Added: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java (rev 0)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.heapfile.service;
+
+import net.sf.joafip.NoStorableAccess;
+import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.TestException;
+import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.heapfile.record.service.DataRecordKeyManager;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+@NoStorableAccess
+public class TestHeapFileDataMgrWithKey extends AbstractTestHeapDataManager {
+
+ public TestHeapFileDataMgrWithKey() throws TestException {
+ super();
+ }
+
+ public TestHeapFileDataMgrWithKey(final String name) throws TestException {
+ super(name);
+ }
+
+ public void testUseAsAMap() throws HeapException {
+ final DataRecordKeyManager keyManager = DataRecordKeyManager
+ .getInstance();
+ createHeapFileDataManager(true);
+ heapDataManager.setDataRecordKeyComparator(keyManager);
+ final DataRecordIdentifier keyA = keyManager.createKey("A");
+ assertFalse("must not found 'A'", heapDataManager.hasDataRecord(keyA));
+ final byte[] dataA = "valueA".getBytes();
+ heapDataManager.writeDataRecord(keyA, dataA);
+ assertTrue("must found 'A'", heapDataManager.hasDataRecord(keyA));
+ final byte[] readDataA = heapDataManager.readDataRecord(keyA);
+ assertNotNull("must read 'A' data", readDataA);
+ assertEquals("valueA", new String(readDataA));
+ }
+
+ @Override
+ protected void createHeap(final boolean removeFile) throws HeapException {
+ // not implemented
+ }
+
+ @Override
+ protected boolean manageFreeRecord() {
+ // not implemented
+ return false;
+ }
+
+}
Modified: trunk/joafip-testsuite/src/main/java/net/sf/joafip/heapfile/service/HeapFileServiceTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/heapfile/service/HeapFileServiceTests.java 2012-01-06 04:58:24 UTC (rev 2987)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/heapfile/service/HeapFileServiceTests.java 2012-03-03 01:35:51 UTC (rev 2988)
@@ -36,6 +36,7 @@
suite.addTestSuite(TestHeapFileDataManagerBackup.class);
suite.addTestSuite(TestHeapFileDataMgrWithScenario.class);
suite.addTestSuite(TestBlockDataManager.class);
+ suite.addTestSuite(TestHeapFileDataMgrWithKey.class);
// $JUnit-END$
return suite;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-03 01:35:57
|
Revision: 2988
http://joafip.svn.sourceforge.net/joafip/?rev=2988&view=rev
Author: luc_peuvrier
Date: 2012-03-03 01:35:51 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
heap file can be use with a comparable key, map in file
Modified Paths:
--------------
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IHeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/TestIdNode.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestStoreRestore.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/DualWrapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapFileCheckerDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMemoryDataManagerMock.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapMultiFileDataManager.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/heapfile/service/HeapFileServiceTests.java
Added Paths:
-----------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/IDataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/NullDataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractDataRecordKeyComparator.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/DataRecordKeyManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-01-06 04:58:31
|
Revision: 2987
http://joafip.svn.sourceforge.net/joafip/?rev=2987&view=rev
Author: luc_peuvrier
Date: 2012-01-06 04:58:24 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
object substitution management change because did not work in autosave mode
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/SerializerModel.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerDelegatingToStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerIOForObject.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerKeptInMemory.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectStateMgr.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/output/ReferenceOutput.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestKeptInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestSaveInExclusiveDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractTestIoManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractSerializeTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java
trunk/joafip-parent/pom.xml
trunk/joafip-testsuite/pom.xml
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -138,8 +138,6 @@
// FIXMELUC __why for checkAssertNotNull
public boolean checkAssertNotNull = true;
- // public boolean acceded;
-
/**
* for {@link #NULL} and {@link ObjectAndPersistInfo#NULL_DEFINED }
*/
@@ -306,7 +304,7 @@
}
/**
- * set the substitute object for an object
+ * set the substitute object for this object
*
* @param substituteObjectAndPersistInfo
* the substitute object
@@ -325,26 +323,18 @@
return substituteObjectAndPersistInfo;
}
- public void clearSubstitution() {
- if (substitutionOfObject != null) {
- substitutionOfObject.substituteObjectAndPersistInfo = null;// NOPMD
- substitutionOfObject = null;// NOPMD
- }
- }
-
public ObjectAndPersistInfo getSubstitutionOfObject() {
return substitutionOfObject;
}
- public void setSubstitutionOfObject(
- final ObjectAndPersistInfo substitutionOfObject) {
- this.substitutionOfObject = substitutionOfObject;
- }
-
public boolean isSubstituted() {
return substituteObjectAndPersistInfo != null;
}
+ public boolean isSubsitute() {
+ return substitutionOfObject != null;
+ }
+
public void clearSonReadObject() {
sonReadObjectList.clear();
}
@@ -416,6 +406,7 @@
// object!=null may be unreferenced object and statemap not already
// cleared
final boolean wasWeaked = weaked;
+ assert !isSubsitute();
if (!weaked && isNotAcceded() && object != null) {
weakReference = new ObjectAndPersistInfoWeakReference(object, this,
queue);
@@ -580,20 +571,26 @@
@Override
public String toString() {
- return
- /**/"objectPersistInfo[" +
- /**/"objectClassInfo[" +
- /**/objectToString()
- /**/+ ", "
- /**/+ objectClassInfo.toString()
- /**/+ "]"
- /**/+ ", "
- /**/+ weakToString()
- /**/+ ", is proxy="
- /**/+ proxyIntanceOrEnhanced
- /**/+ (dataRecordIdentifier == null ?
+ final StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append("objectPersistInfo[");
+ stringBuilder.append("objectClassInfo[");
+ stringBuilder.append(objectToString());
+ stringBuilder.append(", ");
+ stringBuilder.append(objectClassInfo.toString());
+ stringBuilder.append("]");
+ stringBuilder.append(", ");
+ stringBuilder.append(weakToString());
+ stringBuilder.append(", is proxy=");
+ stringBuilder.append(proxyIntanceOrEnhanced);
+ stringBuilder.append((dataRecordIdentifier == null ?
/**/", no associated record" :
- /**/(", record #" + dataRecordIdentifier)) + "]";
+ /**/(", record #" + dataRecordIdentifier)));
+ stringBuilder.append("]");
+ if (substituteObjectAndPersistInfo != null) {
+ stringBuilder.append("\nsubstitute: ");
+ stringBuilder.append(substituteObjectAndPersistInfo.toString());
+ }
+ return stringBuilder.toString();
}
private String objectToString() {
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -205,24 +205,6 @@
}
}
- public void removeObjectAndPersistInfoOfObject(final Object object) {
- synchronized (this) {
- // ASSERTX
- assert object != null : "null has not persistent state";
- key.setObject(object);
- final ObjectAndPersistInfo objectAndPersistInfo = stateMap.get(key);
- // key must not more reference object
- key.clear();
- stateMap.remove(objectAndPersistInfo);
- removeFromQueue(objectAndPersistInfo);
- if (objectAndPersistInfo.isNotWeak()) {
- removeFromReferencedQueue(objectAndPersistInfo);
- }
- final DataRecordIdentifier dataRecordIdentifier = objectAndPersistInfo.dataRecordIdentifier;
- stateMapByIdentifier.remove(dataRecordIdentifier);
- }
- }
-
/**
* create object persistence information, for an object ( no data record
* associated to the object)
@@ -253,6 +235,8 @@
objectAndPersistInfo.setObjectStateMap(this);
// ASSERTX
assert objectAndPersistInfo.getObject() != null : "null object";
+ // ASSERTX
+ assert !objectAndPersistInfo.isSubsitute();
if (stateMap.put(objectAndPersistInfo, objectAndPersistInfo) != null) {
throw new ObjectIOException(
"persistence state already exists for "
@@ -278,6 +262,45 @@
}
}
+ public ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObject(
+ final Object object, final ClassInfo objectClassInfo,
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException {
+ synchronized (this) {
+ removeObjectAndPersistInfoOfObject(substituteObjectAndPersistInfo);
+ final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndPersistInfoOfObject(
+ object, false/* proxyInstance */, objectClassInfo);
+ objectAndPersistInfo
+ .setSubstituteObjectAndPersistInfo(substituteObjectAndPersistInfo);
+ final DataRecordIdentifier dataRecordIdentifier = substituteObjectAndPersistInfo.dataRecordIdentifier;
+ objectAndPersistInfo.setDataRecordIdentifier(dataRecordIdentifier);
+ final ObjectAndPersistInfo previous = stateMapByIdentifier.put(
+ dataRecordIdentifier, objectAndPersistInfo);
+ assert previous == null;
+ return objectAndPersistInfo;
+ }
+ }
+
+ private void removeObjectAndPersistInfoOfObject(
+ final ObjectAndPersistInfo objectAndPersistInfo) {
+ synchronized (this) {
+ final ObjectAndPersistInfo existing = stateMap
+ .remove(objectAndPersistInfo);
+ assert existing != null;
+ assert objectAndPersistInfo.dataRecordIdentifier != null;
+ stateMapByIdentifier
+ .remove(objectAndPersistInfo.dataRecordIdentifier);
+ if (exclusiveAccessSession) {// NOPMD
+ removeFromQueue(objectAndPersistInfo);
+ if (objectAndPersistInfo.isNotWeak()) {
+ removeFromReferencedQueue(objectAndPersistInfo);
+ }
+ final DataRecordIdentifier dataRecordIdentifier = objectAndPersistInfo.dataRecordIdentifier;
+ stateMapByIdentifier.remove(dataRecordIdentifier);
+ }
+ }
+ }
+
private void addToReferencedQueue(final ObjectAndPersistInfo toAdd) {
toAdd.previousReferenced = referencedQueueTail;
if (referencedQueueTail == null) {
@@ -569,7 +592,15 @@
.remove(toRemove.dataRecordIdentifier);
// bad assert, may be no data record associated to object
// assert removed == toRemove : removed + "\n" + toRemove;
- toRemove.clearSubstitution();
+ final ObjectAndPersistInfo substitute = toRemove
+ .getSubstituteObjectAndPersistInfo();
+ if (substitute != null) {
+ final DataRecordIdentifier substituteDataRecordIdentifier = substitute.dataRecordIdentifier;
+ if (substituteDataRecordIdentifier != null) {
+ stateMapByIdentifier.remove(substituteDataRecordIdentifier);
+ }
+ stateMap.remove(substitute);
+ }
removeFromQueue(toRemove);
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/SerializerModel.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/SerializerModel.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/SerializerModel.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -158,6 +158,17 @@
return objectAndPersistInfo;
}
+ public ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObject(
+ final Object object, final ClassInfo objectClassInfo,
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException {
+ final ObjectAndPersistInfo objectAndPersistInfo = createObjectAndPersistInfoOfObject(
+ object, objectClassInfo);
+ objectAndPersistInfo
+ .setSubstituteObjectAndPersistInfo(substituteObjectAndPersistInfo);
+ return objectAndPersistInfo;
+ }
+
public DataRecordIdentifier getNewDataRecordIdentifier() {
final DataRecordIdentifier result = nextDataRecordIdentifier;
nextDataRecordIdentifier = new DataRecordIdentifier(
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerDelegatingToStateMap.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerDelegatingToStateMap.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerDelegatingToStateMap.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -96,6 +96,15 @@
}
@Override
+ protected ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObjectImpl(
+ final Object object, final ClassInfo objectClassInfo,
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException {
+ return objectStateMgr.createSubstitutedObjectAndPersistInfoOfObject(
+ object, objectClassInfo, substituteObjectAndPersistInfo);
+ }
+
+ @Override
public ObjectAndPersistInfo getObjectAndPersistInfoOfObject(
final Object object) throws ObjectIOException {
ObjectAndPersistInfo objectAndPersistInfoOfObject = ProxyManager2
@@ -107,9 +116,9 @@
return objectAndPersistInfoOfObject;
}
- public void removeObjectAndPersistInfoOfObject(final Object object) {
- objectStateMgr.removeObjectAndPersistInfoOfObject(object);
- }
+ // public void removeObjectAndPersistInfoOfObject(final Object object) {
+ // objectStateMgr.removeObjectAndPersistInfoOfObject(object);
+ // }
/**
* get data record identifier associated to an object
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerIOForObject.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerIOForObject.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerIOForObject.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -509,34 +509,36 @@
ObjectIODataRecordNotFoundException;
@Override
- public DataRecordIdentifier getDataRecordIdentifierAssociatedToObject(
+ public DataRecordIdentifier getOrCreateDataRecordIdentifierAssociatedToObject(
final ObjectAndPersistInfo objectAndPersistInfo)
throws ObjectIOException, ObjectIODataCorruptedException {
- ObjectAndPersistInfo substituteObjectAndPersistInfo;
- final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
- if (classInfo.isWriteSubstituted()) {
- substituteObjectAndPersistInfo = substituteForWrite(objectAndPersistInfo);
+ DataRecordIdentifier dataRecordIdentifier = objectAndPersistInfo.dataRecordIdentifier;
+ // /**/getCurrentDataRecordIdentifierAssociatedToObject(objectAndItsClassInfo);
+ /* true if created here, false if have been associated data record */
+ final boolean identifierCreated;
+ if (dataRecordIdentifier == null) {
+ identifierCreated = true;
+ final DataRecordIdentifier newDataRecordIdentifier =
+ /**/associateNewDataRecordIdentifierToObject(objectAndPersistInfo);
+ dataRecordIdentifier = newDataRecordIdentifier;
} else {
- substituteObjectAndPersistInfo = keptInMemorysubstituteObject(objectAndPersistInfo);
- if (substituteObjectAndPersistInfo == null) {
- substituteObjectAndPersistInfo = substituteObject(objectAndPersistInfo);
- if (substituteObjectAndPersistInfo == null) {
- substituteObjectAndPersistInfo = objectAndPersistInfo;
- }
- }
+ identifierCreated = false;
}
- return localGetDataRecordIdentifierAssociatedToObject(substituteObjectAndPersistInfo);
+ if (identifierCreated) {
+ objectAndPersistInfo.setNewObject(identifierCreated);
+ }
+ return dataRecordIdentifier;
}
public ObjectAndPersistInfo substituteForWrite(
- final ObjectAndPersistInfo objectAndItsClassInfo)
+ final ObjectAndPersistInfo objectAndPersistInfo)
throws ObjectIOException, ObjectIODataCorruptedException {
- assertNotSubstituted(objectAndItsClassInfo);
+ assertNotSubstituted(objectAndPersistInfo);
ObjectAndPersistInfo result;
- final ClassInfo classInfo = objectAndItsClassInfo.objectClassInfo;
+ final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
final ClassInfo substituteClassInfo = classInfo
.getSubstituteClassInfo();
- result = objectAndItsClassInfo.getSubstituteObjectAndPersistInfo();
+ result = objectAndPersistInfo.getSubstituteObjectAndPersistInfo();
if (result == null) {
Class<?> substituteClass;
substituteClass = substituteClassInfo.getObjectClass();
@@ -550,35 +552,13 @@
final ISubsituteSynchronizer synchronizer = classInfo
.getSubsituteSynchronizer();
synchronizer.synchronizeSubstitute(
- objectAndItsClassInfo.getObject(), substituteObject);
- result = getOrCreateObjectPersistInfoOfObject(substituteObject,
- Boolean.FALSE, substituteClassInfo, true);
- objectAndItsClassInfo.setSubstituteObjectAndPersistInfo(result);
+ objectAndPersistInfo.getObject(), substituteObject);
+ result = createSubstituteObjectPersistInfoOfObject(
+ substituteObject, substituteClassInfo, objectAndPersistInfo);
}
return result;
}
- private DataRecordIdentifier localGetDataRecordIdentifierAssociatedToObject(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIODataCorruptedException {
- DataRecordIdentifier dataRecordIdentifier = objectAndItsClassInfo.dataRecordIdentifier;
- // /**/getCurrentDataRecordIdentifierAssociatedToObject(objectAndItsClassInfo);
- /* true if created here, false if have been associated data record */
- final boolean identifierCreated;
- if (dataRecordIdentifier == null) {
- identifierCreated = true;
- final DataRecordIdentifier newDataRecordIdentifier =
- /**/associateNewDataRecordIdentifierToObject(objectAndItsClassInfo);
- dataRecordIdentifier = newDataRecordIdentifier;
- } else {
- identifierCreated = false;
- }
- if (identifierCreated) {
- objectAndItsClassInfo.setNewObject(identifierCreated);
- }
- return dataRecordIdentifier;
- }
-
protected abstract DataRecordIdentifier associateNewDataRecordIdentifierToObject(
final ObjectAndPersistInfo objectAndPersistInfo)
throws ObjectIODataCorruptedException, ObjectIOException;
@@ -595,7 +575,7 @@
objectAndPersistInfo = createObjectReadingInStore(
dataRecordIdentifier, notLazy);
}
- return original(objectAndPersistInfo);
+ return objectAndPersistInfo;
}
/**
@@ -706,8 +686,9 @@
}
}
+ // FIXMELUC ______notToGarbage ?
notToGarbage(dataRecordIdentifier, objectAndPersistInfo);
- return original(objectAndPersistInfo);
+ return originalObjectAndPersistInfo(objectAndPersistInfo);
}
private boolean assertOriginalClassInfo(final ClassInfo classInfo,
@@ -924,7 +905,7 @@
return replacementDefList;
}
- protected ObjectAndPersistInfo original(
+ protected ObjectAndPersistInfo originalObjectAndPersistInfo(
final ObjectAndPersistInfo objectAndPersistInfo)
throws ObjectIOException, ObjectIODataCorruptedException,
ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
@@ -959,11 +940,10 @@
substituteOfClassInfo = classInfo.getSubstituteOfClassInfo();
}
- /* original/substituted in storage is not persisted, never a proxy */
- result = getOrCreateObjectPersistInfoOfObject(substitutedObject,
- Boolean.FALSE, substituteOfClassInfo, false/*
- * not persisted
- */);
+ result = createSubstitutedObjectAndPersistInfoOfObjectImpl(
+ substitutedObject, substituteOfClassInfo,
+ objectAndPersistInfo);
+
} else {
result = objectAndPersistInfo;
}
@@ -1032,6 +1012,7 @@
if (toWriteObjectAndPersistInfo == null) {
toWriteObjectAndPersistInfo = objectAndItsPersistInfo;
}
+ assert !toWriteObjectAndPersistInfo.isSubstituted();
// ASSERTX
assert assertWritable(toWriteObjectAndPersistInfo);
@@ -1124,6 +1105,7 @@
// ASSERTX
assert assertHasInstance(toWriteObjectAndPersistInfo, object);
objectOutput = getObjectOutput(toWriteClassInfo);
+ assert !toWriteClassInfo.isSubstituted();
objectOutput.prepareWrite(toWriteObjectAndPersistInfo);
}
@@ -1145,6 +1127,7 @@
if (objectAndPersistInfo.objectClassInfo.isSubstituted()) {
substituteObjectAndPersistInfo = objectAndPersistInfo
.getSubstituteObjectAndPersistInfo();
+
if (substituteObjectAndPersistInfo == null) {
final Object object = objectAndPersistInfo.getObject();
final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
@@ -1154,12 +1137,11 @@
.substituteObject(object);
final ClassInfo substituteClassInfo = classInfo
.getSubstituteClassInfo();
- substituteObjectAndPersistInfo = getOrCreateObjectPersistInfoOfObject(
- substituteObject, Boolean.FALSE, substituteClassInfo,
- true/* persisted */);
- objectAndPersistInfo
- .setSubstituteObjectAndPersistInfo(substituteObjectAndPersistInfo);
+ substituteObjectAndPersistInfo = createSubstituteObjectPersistInfoOfObject(
+ substituteObject, substituteClassInfo,
+ objectAndPersistInfo);
}
+
} else {
substituteObjectAndPersistInfo = null;// NOPMD
}
@@ -1212,6 +1194,8 @@
objectIsProxyInstance = ProxyManager2.isProxyOrEnhanced(object);
} else {
objectIsProxyInstance = proxyInstance.booleanValue();
+ assert objectIsProxyInstance == ProxyManager2
+ .isProxyOrEnhanced(object);
}
try {
objectPersistInfoOfObject = new ObjectAndPersistInfo(object,
@@ -1270,6 +1254,8 @@
objectIsProxyInstance = ProxyManager2.isProxyOrEnhanced(object);
} else {
objectIsProxyInstance = proxyInstance.booleanValue();
+ assert objectIsProxyInstance == ProxyManager2
+ .isProxyOrEnhanced(object);
}
final ObjectAndPersistInfo objectPersistInfoOfObject = createObjectAndPersistInfoOfObjectImpl(
object, objectIsProxyInstance, objectClassInfo);
@@ -1301,10 +1287,35 @@
}
protected abstract ObjectAndPersistInfo createObjectAndPersistInfoOfObjectImpl(
- final Object object, final boolean proxyInstance,
- final ClassInfo objectClassInfo) throws ObjectIOException;
+ Object object, boolean proxyInstance, ClassInfo objectClassInfo)
+ throws ObjectIOException;
+ protected abstract ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObjectImpl(
+ Object object, ClassInfo objectClassInfo,
+ ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException;
+
@Override
+ protected ObjectAndPersistInfo createSubstituteObjectPersistInfoOfObject(
+ final Object substituteObject, final ClassInfo substituteClassInfo,
+ final ObjectAndPersistInfo substitutedObjectAndPersistInfo)
+ throws ObjectIOException {
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo;
+ try {
+ substituteObjectAndPersistInfo = new ObjectAndPersistInfo(
+ substituteObject, false/* proxyInstance */,
+ substituteClassInfo);
+ } catch (ClassInfoException exception) {
+ throw new ObjectIOException(exception);
+ }
+ substitutedObjectAndPersistInfo
+ .setSubstituteObjectAndPersistInfo(substituteObjectAndPersistInfo);
+ substituteObjectAndPersistInfo
+ .setDataRecordIdentifier(substitutedObjectAndPersistInfo.dataRecordIdentifier);
+ return substituteObjectAndPersistInfo;
+ }
+
+ @Override
public ObjectAndPersistInfo getOrCreateObjectPersistInfoOfObject(
final Object object, final boolean proxyInstance,
final ClassInfo objectClassInfo,
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerKeptInMemory.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerKeptInMemory.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerKeptInMemory.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -47,19 +47,19 @@
protected final ClassInfoFactory classInfoFactory;
- private final ClassInfo substituteClassInfo;
+ private final ClassInfo keptInMemoryObjectKeysubstituteClassInfo;
public AbstractObjectIOManagerKeptInMemory(
final ClassInfoFactory classInfoFactory) throws ObjectIOException {
super();
this.classInfoFactory = classInfoFactory;
try {
- substituteClassInfo = classInfoFactory
+ keptInMemoryObjectKeysubstituteClassInfo = classInfoFactory
.getNoProxyClassInfo(KeptInMemoryObjectKey.class);
} catch (ClassInfoException exception) {
throw new ObjectIOException(exception);
}
- substituteClassInfo.setIsSubstitution();
+ keptInMemoryObjectKeysubstituteClassInfo.setIsSubstitution();
}
protected KeptInMemoryObjectManager getKeptInMemorySubstituteObjectManager() {
@@ -92,18 +92,23 @@
if (substituteObject == null) {
substituteObjectAndPersistInfo = null;
} else {
- substituteObjectAndPersistInfo = getOrCreateObjectPersistInfoOfObject(
- substituteObject, Boolean.FALSE, substituteClassInfo,
- true/* persisted */);
- objectAndPersistInfo
- .setSubstituteObjectAndPersistInfo(substituteObjectAndPersistInfo);
+ substituteObjectAndPersistInfo = createSubstituteObjectPersistInfoOfObject(
+ substituteObject,
+ keptInMemoryObjectKeysubstituteClassInfo,
+ objectAndPersistInfo);
}
+
} else {
substituteObjectAndPersistInfo = null;
}
return substituteObjectAndPersistInfo;
}
+ protected abstract ObjectAndPersistInfo createSubstituteObjectPersistInfoOfObject(
+ Object substituteObject, ClassInfo substituteClassInfo,
+ ObjectAndPersistInfo substitutedObjectAndPersistInfo)
+ throws ObjectIOException;
+
@Override
public boolean isKeptInMemory(final Object object) {
return keptInMemorySubstituteObjectManager.isKeptInMemory(object);
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForObjectIO.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForObjectIO.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForObjectIO.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -44,17 +44,18 @@
int getCurrentDataModelIdentifier();
/**
- * get data record identifier associated to object<br>
+ * get or create data record identifier associated to object<br>
* check id data record associated to object exists and create it if needed<br>
*
* @param object
* the object instance
- * @return the data record identifier associated to object
+ * @return the data record identifier associated to object (current or
+ * created)
* @throws ObjectIOException
* @throws ObjectIODataCorruptedException
*
*/
- DataRecordIdentifier getDataRecordIdentifierAssociatedToObject(
+ DataRecordIdentifier getOrCreateDataRecordIdentifierAssociatedToObject(
ObjectAndPersistInfo objectAndItsClassInfo)
throws ObjectIOException, ObjectIODataCorruptedException;
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -198,6 +198,7 @@
final ClassInfo classInfo = toWriteObjectAndItsClassInfo.objectClassInfo;
final IObjectOutput objectOutput;
objectOutput = getObjectOutput(classInfo);
+ assert !toWriteObjectAndItsClassInfo.isSubstituted();
return objectOutput.willNotBeWrote(toWriteObjectAndItsClassInfo);
}
@@ -242,6 +243,7 @@
final ClassInfo classInfo = toWriteObjectAndItsClassInfo.objectClassInfo;
final IObjectOutput objectOutput;
objectOutput = getObjectOutput(classInfo);
+ assert !toWriteObjectAndItsClassInfo.isSubstituted();
if (toWriteObjectAndItsClassInfo.newObject) {
if (garbageManagement) {
objectOutput
@@ -388,7 +390,6 @@
ObjectIODataRecordNotFoundException,
ObjectIODataCorruptedException,
ObjectIOTooBigForSerializationException {
-
final ClassInfo classInfo = objectAndPersistInfo.objectClassInfo;
ObjectAndPersistInfo toWrite;
toWrite = keptInMemorysubstituteObject(objectAndPersistInfo);
@@ -410,6 +411,7 @@
/* the object class can be different than object.getClass() */
final IObjectOutput objectOutput;
objectOutput = getObjectOutput(classInfo);
+ assert !toWrite.isSubstituted();
objectOutput.prepareWrite(toWrite);
final int byteSizeForObject = objectOutput.byteSize(toWrite,
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectStateMgr.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectStateMgr.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectStateMgr.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -91,19 +91,21 @@
return objectAndPersistInfoOfObject;
}
- public void removeObjectAndPersistInfoOfObject(final Object object) {
- objectStateMap.removeObjectAndPersistInfoOfObject(object);
- }
-
public ObjectAndPersistInfo createObjectAndPersistInfoOfObject(
final Object object, final boolean proxyInstance,
final ClassInfo objectClassInfo) throws ObjectIOException {
- final ObjectAndPersistInfo objectAndPersistInfoOfObject = objectStateMap
- .createObjectAndPersistInfoOfObject(object, proxyInstance,
- objectClassInfo);
- return objectAndPersistInfoOfObject;
+ return objectStateMap.createObjectAndPersistInfoOfObject(object,
+ proxyInstance, objectClassInfo);
}
+ public ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObject(
+ final Object object, final ClassInfo objectClassInfo,
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException {
+ return objectStateMap.createSubstitutedObjectAndPersistInfoOfObject(
+ object, objectClassInfo, substituteObjectAndPersistInfo);
+ }
+
/**
* clear all persistence state associated to object in memory
*
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -264,6 +264,15 @@
}
@Override
+ protected ObjectAndPersistInfo createSubstitutedObjectAndPersistInfoOfObjectImpl(
+ final Object object, final ClassInfo objectClassInfo,
+ final ObjectAndPersistInfo substituteObjectAndPersistInfo)
+ throws ObjectIOException {
+ return model.createSubstitutedObjectAndPersistInfoOfObject(object,
+ objectClassInfo, substituteObjectAndPersistInfo);
+ }
+
+ @Override
public ObjectAndPersistInfo getObjectAndPersistInfoOfObject(
final Object object) throws ObjectIOException {
return model.getObjectAndPersistInfoOfObject(object);
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/output/ReferenceOutput.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/output/ReferenceOutput.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/output/ReferenceOutput.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -70,7 +70,7 @@
identifier = null;// NOPMD identifier not defined
} else {
identifier = objectIOManager
- .getDataRecordIdentifierAssociatedToObject(objectAndPersistInfo);
+ .getOrCreateDataRecordIdentifierAssociatedToObject(objectAndPersistInfo);
// ASSERTX
assert identifier != null : "identifier must be defined";
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestKeptInMemory.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestKeptInMemory.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestKeptInMemory.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -102,6 +102,7 @@
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException,
FilePersistenceTooBigForSerializationException {
+ filePersistence.addToNotCheckMethod(Bob1.class);
final Object keptInMemoryObject = new Object();
filePersistence.keptInMemory("object", keptInMemoryObject);
final IDataAccessSession dataAccessSession = filePersistence
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestSaveInExclusiveDataAccessSession.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestSaveInExclusiveDataAccessSession.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestSaveInExclusiveDataAccessSession.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -103,6 +103,7 @@
builder.setGarbageManagement(false);
builder.setCrashSafeMode(false);
filePersistence = (FilePersistence) builder.build();
+ filePersistence.addToNotCheckMethod(Bob1.class);
dataAccessSession = filePersistence.createExclusiveDataAccessSession();
}
@@ -197,7 +198,7 @@
dataAccessSession.close();
}
- public void testSaveWithSubstitution() throws FilePersistenceException,
+ public void testSaveWithSubstitutionSave() throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
@@ -217,10 +218,40 @@
bob = null;// NOPMD unreference
dataAccessSession.save();
assertNoPersistedObjectState();
+
bob = (SubstitutedBob) dataAccessSession.getObject(KEY);
assertNotNull("must exist", bob);
}
+ public void testSaveWithSubstitutionClose()
+ throws FilePersistenceException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceDataCorruptedException,
+ FilePersistenceNotSerializableException, ClassInfoException,
+ ReflectException, ObjectIOException,
+ ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
+ ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
+ ObjectIONotSerializableException, ProxyException,
+ FilePersistenceTooBigForSerializationException {
+ filePersistence.setSubstituteObjectManager(SubstitutedBob.class,
+ SubstitutionBobCopy.class, new SubstituteObjectManager0());
+
+ dataAccessSession.open();
+ SubstitutedBob bob = new SubstitutedBob(0);
+ bob.setObject1(new Bob1());
+ dataAccessSession.setObject(KEY, bob);
+ bob = null;// NOPMD unreference
+ dataAccessSession.save();
+ assertNoPersistedObjectState();
+
+ dataAccessSession.close();
+ dataAccessSession.open();
+
+ bob = (SubstitutedBob) dataAccessSession.getObject(KEY);
+ assertNotNull("must exist", bob);
+ }
+
private void assertNoPersistedObjectState()
throws FilePersistenceException, ClassInfoException,
ReflectException, ObjectIOException,
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractTestIoManager.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractTestIoManager.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractTestIoManager.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -192,7 +192,7 @@
.willNotBeWrote(objectAndItsPersistInfo);
}
final DataRecordIdentifier dataRecordIdentifier = objectIOManager
- .getDataRecordIdentifierAssociatedToObject(objectAndItsPersistInfo);
+ .getOrCreateDataRecordIdentifierAssociatedToObject(objectAndItsPersistInfo);
return new WriteResult(valueChanged, referenceChangeList,
referencedSons, dataRecordIdentifier);
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -268,7 +268,7 @@
objectClassInfo, persisted);
}
- public DataRecordIdentifier getDataRecordIdentifierAssociatedToObject(
+ public DataRecordIdentifier getOrCreateDataRecordIdentifierAssociatedToObject(
final ObjectAndPersistInfo objectAndItsClassInfo)
throws ObjectIOException, ObjectIODataCorruptedException {
DataRecordIdentifier dataRecordIdentifier = objectAndItsClassInfo.dataRecordIdentifier;
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractSerializeTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractSerializeTest.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractSerializeTest.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -126,7 +126,7 @@
assertSons(toSerialize, originalValue, referenceds);
// dummy data record identifier for object
final DataRecordIdentifier dataRecordIdentifier =
- /**/getDataRecordIdentifierAssociatedToObject(objectAndPersistInfo);
+ /**/getOrCreateDataRecordIdentifierAssociatedToObject(objectAndPersistInfo);
// create the object by reading
final IObjectInput objectInput = new ObjectInputImmediateSerializable(
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -182,7 +182,7 @@
.createObjectAndPersistInfoOfObject(bob1, false, bob1ClassInfo);
objectAndItsClassInfo.setObjectStateMap(objectStateMap);
final DataRecordIdentifier identifier = objectIOManager
- .getDataRecordIdentifierAssociatedToObject(objectAndItsClassInfo);
+ .getOrCreateDataRecordIdentifierAssociatedToObject(objectAndItsClassInfo);
objectIOManager.prepareWrite(objectAndItsClassInfo);
objectIOManager.write(objectAndItsClassInfo);
Modified: trunk/joafip-parent/pom.xml
===================================================================
--- trunk/joafip-parent/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip-parent/pom.xml 2012-01-06 04:58:24 UTC (rev 2987)
@@ -237,6 +237,13 @@
<goal>jar</goal>
</goals>
</execution>
+ <execution>
+ <id>attach-test-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
@@ -255,6 +262,13 @@
</manifestEntries>
</archive>
</configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
@@ -281,6 +295,7 @@
<LANG>en</LANG>
</environmentVariables>
<argLine>-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
+ <skipTests>true</skipTests>
</configuration>
</plugin>
Modified: trunk/joafip-testsuite/pom.xml
===================================================================
--- trunk/joafip-testsuite/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip-testsuite/pom.xml 2012-01-06 04:58:24 UTC (rev 2987)
@@ -23,69 +23,161 @@
<groupId>net.sf.joafip</groupId>
<artifactId>joafip</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-asm</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
<artifactId>joafip-common</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-common</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-collection</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-collection</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-heapfile</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-heapfile</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-rbtree</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-rbtree</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-file</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-file</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-callback</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
<artifactId>joafip-example-simplestore</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-example-simplestore</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-meminspector</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
+ <scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-meminspector</artifactId>
+ <version>4.0.0b8</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-log4j</artifactId>
<version>4.0.0b8</version>
+ <type>jar</type>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>gnu.trove</groupId>
+ <artifactId>trove</artifactId>
+ <version>2.0.4</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
-
+
</project>
Modified: trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2012-01-02 08:09:03 UTC (rev 2986)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2012-01-06 04:58:24 UTC (rev 2987)
@@ -24,8 +24,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import net.sf.joafip.store.service.TestGarbageForegroundFile;
-import net.sf.joafip.store.service.proxy.TestProxyCreationConstructed;
+import net.sf.joafip.service.rel300.TestClassLoaderPersistence;
+import net.sf.joafip.service.rel300.TestKeptInMemory;
+import net.sf.joafip.service.rel400.TestSaveInExclusiveDataAccessSession;
/**
*
@@ -42,8 +43,9 @@
public static Test suite() {
final TestSuite suite = new TestSuite("in error Tests");
// $JUnit-BEGIN$
- suite.addTestSuite(TestGarbageForegroundFile.class);
- suite.addTestSuite(TestProxyCreationConstructed.class);
+ suite.addTestSuite(TestSaveInExclusiveDataAccessSession.class);
+ suite.addTestSuite(TestClassLoaderPersistence.class);
+ suite.addTestSuite(TestKeptInMemory.class);
// suite.addTest(xxxx.suite());
// $JUnit-END$
return suite;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-01-06 04:58:31
|
Revision: 2987
http://joafip.svn.sourceforge.net/joafip/?rev=2987&view=rev
Author: luc_peuvrier
Date: 2012-01-06 04:58:24 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
object substitution management change because did not work in autosave mode
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/SerializerModel.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerDelegatingToStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerIOForObject.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/AbstractObjectIOManagerKeptInMemory.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectStateMgr.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/output/ReferenceOutput.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestKeptInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestSaveInExclusiveDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractTestIoManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractSerializeTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java
trunk/joafip-parent/pom.xml
trunk/joafip-testsuite/pom.xml
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-01-02 08:09:12
|
Revision: 2986
http://joafip.svn.sourceforge.net/joafip/?rev=2986&view=rev
Author: luc_peuvrier
Date: 2012-01-02 08:09:03 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
warning correction. changed to eclipse maven project
Modified Paths:
--------------
trunk/joafip/pom.xml
trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
trunk/joafip/src/test/java/net/sf/joafip/AbstractJoafipTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestSerializable.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerCheckerFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerMultiFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestMultiAccessFilePersistence.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestSaveFailureDoNotModifyStorage.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestStoreNotStorable.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFileCheckPersistenceForTest.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFilePersistenceForTest.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractTestSerializableAndNotLazy.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy1.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy2.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestArraySerialization.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerialize.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerializeReadWriteMethod.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSubstitutedSerializable.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionWithDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel301/AbstractTestRuntime300.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestFileManagementOptions.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestObjectReferenceLinkInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirectNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazyNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazyNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/AbstractTestPersistableCodeGenerator.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionArrayListNosubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionLinkedListNosubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeMapSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsWithG.java
trunk/joafip-4test/pom.xml
trunk/joafip-asm/net/sf/joafip/asm/ClassAdapter.java
trunk/joafip-asm/net/sf/joafip/asm/MethodAdapter.java
trunk/joafip-asm/pom.xml
trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/ClassAdapter.java
trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/MethodAdapter.java
trunk/joafip-callback/pom.xml
trunk/joafip-collection/pom.xml
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractIteratorTest.java
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractLinkedListTest.java
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractListTest.java
trunk/joafip-common/pom.xml
trunk/joafip-common/src/main/java/net/sf/joafip/logger/JoafipLogger.java
trunk/joafip-example-database/pom.xml
trunk/joafip-example-hugemap/pom.xml
trunk/joafip-example-simplestore/pom.xml
trunk/joafip-file/pom.xml
trunk/joafip-heapfile/pom.xml
trunk/joafip-java-agent/pom.xml
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityManager.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityManagerFactory.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityTransaction.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipPersistenceProvider.java
trunk/joafip-jpa/src/test/java/examples/Product.java
trunk/joafip-jpa/src/test/java/examples/SimpleJPA.java
trunk/joafip-log4j/pom.xml
trunk/joafip-meminspector/pom.xml
trunk/joafip-rbtree/pom.xml
trunk/joafip-testsuite/pom.xml
Added Paths:
-----------
trunk/joafip-parent/.settings/
trunk/joafip-parent/.settings/org.eclipse.core.resources.prefs
trunk/joafip-parent/.settings/org.eclipse.m2e.core.prefs
Modified: trunk/joafip/pom.xml
===================================================================
--- trunk/joafip/pom.xml 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
@@ -7,7 +7,7 @@
<version>1.0.0</version>
<relativePath>../joafip-parent</relativePath>
</parent>
- <groupId>net.sf.joafip</groupId>
+ <!-- <groupId>net.sf.joafip</groupId> -->
<artifactId>joafip</artifactId>
<packaging>jar</packaging>
<version>4.0.0b8</version>
Modified: trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -37,7 +37,6 @@
import net.sf.joafip.store.service.classinfo.ClassInfoException;
import net.sf.joafip.store.service.classinfo.ClassInfoFactory;
import net.sf.joafip.store.service.classinfo.IClassInfoFactory;
-
import sun.reflect.ReflectionFactory;//NOPMD
/**
@@ -46,6 +45,7 @@
* @author luc peuvrier
*
*/
+@SuppressWarnings("restriction")
@NotStorableClass
public final class HelperReflect {
Modified: trunk/joafip/src/test/java/net/sf/joafip/AbstractJoafipTestCase.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/AbstractJoafipTestCase.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/AbstractJoafipTestCase.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -26,7 +26,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
StaticProxyCallBack.clear();
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -54,7 +54,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, dataManager,
// true/* proxy */, true/* remove file */, true/* garbage */);
@@ -67,7 +67,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
filePersistence.close();
} catch (final Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestSerializable.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestSerializable.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestSerializable.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -55,7 +55,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path,
// /**/false/* do not remove files */,
@@ -71,7 +71,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
filePersistence.close();
} catch (final Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerCheckerFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerCheckerFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerCheckerFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -43,7 +43,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
final File openFileTraceFile = new File(
TestConstant.getWinRamDiskRuntimeDir() + File.separator
+ "trace.txt");
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -43,7 +43,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
final File openFileTraceFile = new File(
TestConstant.getWinRamDiskRuntimeDir() + File.separator
+ "trace.txt");
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerMultiFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerMultiFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerMultiFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -42,7 +42,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
dataManager = new HeapMultiFileDataManager(new File(
TestConstant.getWinRamDiskRuntimeDir() + "/multifile"));
super.setUp();
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestMultiAccessFilePersistence.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestMultiAccessFilePersistence.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestMultiAccessFilePersistence.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path,
// /**/true/* remove files */,
@@ -62,7 +62,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
filePersistence.close();
} catch (final Throwable throwable) {// NOPMD ignore error
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestSaveFailureDoNotModifyStorage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestSaveFailureDoNotModifyStorage.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestSaveFailureDoNotModifyStorage.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -50,7 +50,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
createFilePersistence();
}
@@ -74,7 +74,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
if (session != null && session.isOpened()) {
session.close(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestStoreNotStorable.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestStoreNotStorable.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestStoreNotStorable.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path,
// /**/false/* do not remove files */,
@@ -63,7 +63,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
if (session != null && session.isOpened()) {
session.close(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFileCheckPersistenceForTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFileCheckPersistenceForTest.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFileCheckPersistenceForTest.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -45,7 +45,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
logger.info("begin setup");
// filePersistence = new FilePersistence(1, null,
@@ -66,7 +66,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
if (session.isOpened()) {
session.closeAndWait(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFilePersistenceForTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFilePersistenceForTest.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFilePersistenceForTest.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -44,7 +44,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, false, true);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -56,7 +56,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
if (session.isOpened()) {
session.closeAndWait(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractTestSerializableAndNotLazy.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractTestSerializableAndNotLazy.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractTestSerializableAndNotLazy.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -62,7 +62,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
if (session.isOpened()) {
session.closeAndWait(EnumFilePersistenceCloseAction.DO_NOT_SAVE);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy1.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy1.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy1.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path,
// /**/true/* removeFile */, true/* garbageManagement */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy2.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy2.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy2.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path,
// /**/true/* removeFile */,
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestArraySerialization.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestArraySerialization.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestArraySerialization.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -63,7 +63,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, true, false);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -76,7 +76,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Exception exception) { // NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerialize.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerialize.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerialize.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -80,7 +80,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, true, false);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -97,7 +97,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Exception exception) { // NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerializeReadWriteMethod.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerializeReadWriteMethod.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerializeReadWriteMethod.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -81,7 +81,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, true, false);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -98,7 +98,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Exception exception) { // NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSubstitutedSerializable.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSubstitutedSerializable.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSubstitutedSerializable.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -80,7 +80,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, true, false);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -97,7 +97,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Exception exception) { // NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionWithDataAccessSession.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionWithDataAccessSession.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionWithDataAccessSession.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -78,7 +78,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
// filePersistence = new FilePersistence(1, null, path, true, false);
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
@@ -91,7 +91,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Exception exception) { // NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel301/AbstractTestRuntime300.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel301/AbstractTestRuntime300.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel301/AbstractTestRuntime300.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -72,7 +72,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
filePersistence.close();
} catch (final Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestFileManagementOptions.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestFileManagementOptions.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestFileManagementOptions.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -74,7 +74,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
filePersistence.close();
} catch (final Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -40,7 +40,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null,
TestConstant.getWinRamDiskRuntimeDir(), true/* garbage */);
@@ -50,7 +50,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInMemory.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInMemory.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInMemory.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -40,7 +40,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager, false, true/*
@@ -52,7 +52,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -39,7 +39,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null,
@@ -54,7 +54,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInMemory.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInMemory.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInMemory.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -39,7 +39,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager, false, false/*
@@ -55,7 +55,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestObjectReferenceLinkInFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestObjectReferenceLinkInFile.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestObjectReferenceLinkInFile.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -40,7 +40,7 @@
super(name);
}
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null,
TestConstant.getWinRamDiskRuntimeDir(), true/* garbage */);
@@ -50,7 +50,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Throwable throwable) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirect.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirect.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirect.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -35,7 +35,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* proxyMode */,
@@ -49,7 +49,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirectNoGarbage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirectNoGarbage.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirectNoGarbage.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -36,7 +36,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* proxyMode */,
@@ -50,7 +50,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazy.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazy.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazy.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -35,7 +35,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/1024/* page size */,
@@ -47,7 +47,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazyNoGarbage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazyNoGarbage.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazyNoGarbage.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -35,7 +35,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/1024/* page size */,
@@ -47,7 +47,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryDirect.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryDirect.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryDirect.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -36,7 +36,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager, false/* lazy mode */,
@@ -46,7 +46,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryLazy.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryLazy.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryLazy.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -36,7 +36,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager, true/* lazy mode */,
@@ -46,7 +46,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception {// NOPMD
try {
store.close();
} catch (Exception e) {// NOPMD
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -17,7 +17,7 @@
}
@Override
- public void setUp() throws Exception {
+ public void setUp() throws Exception {// NOPMD
super.setUp();
openStore(true);
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileDirect.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileDirect.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileDirect.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -25,7 +25,7 @@
public class TestStoreWithBobFileDirect extends AbstractTestStoreWithBob {// NOPMD
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path, false);
store.openAndNewAccessSession(true/* removeFiles */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazy.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazy.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazy.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -33,7 +33,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path, true/* garbage */);
store.openAndNewAccessSession(true/* removeFiles */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazyNoGarbage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazyNoGarbage.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazyNoGarbage.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -34,7 +34,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryDirect.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryDirect.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryDirect.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -34,7 +34,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager, false, true/*
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryLazy.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryLazy.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryLazy.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -34,7 +34,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
dataManager = new HeapMemoryDataManagerMock();
store = new StoreForTest(1, null, dataManager,
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -17,7 +17,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
openStore(true);
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/AbstractTestPersistableCodeGenerator.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/AbstractTestPersistableCodeGenerator.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/AbstractTestPersistableCodeGenerator.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -41,7 +41,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
setUpImpl();
}
@@ -49,7 +49,7 @@
protected abstract void setUpImpl() throws Exception;// NOPMD
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
// if (JoafipJavaAgent.installed()) {
tearDownImpl();
// if (!transformerInstalled) {
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -34,7 +34,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -34,7 +34,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionArrayListNosubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionArrayListNosubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionArrayListNosubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -46,7 +46,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionLinkedListNosubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionLinkedListNosubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionLinkedListNosubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -46,7 +46,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception { // NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeMapSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeMapSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeMapSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsNoG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsNoG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/false/* do not manage garbage */);
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsWithG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsWithG.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsWithG.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -47,7 +47,7 @@
}
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {// NOPMD
super.setUp();
store = new StoreForTest(1, null, path,
/**/true/* manage garbage */);
Modified: trunk/joafip-4test/pom.xml
===================================================================
--- trunk/joafip-4test/pom.xml 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-4test/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
@@ -7,7 +7,7 @@
<version>1.0.0</version>
<relativePath>../joafip-parent</relativePath>
</parent>
- <groupId>net.sf.joafip</groupId>
+ <!-- <groupId>net.sf.joafip</groupId> -->
<artifactId>joafip-4test</artifactId>
<packaging>jar</packaging>
<version>4.0.0b8</version>
Modified: trunk/joafip-asm/net/sf/joafip/asm/ClassAdapter.java
===================================================================
--- trunk/joafip-asm/net/sf/joafip/asm/ClassAdapter.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-asm/net/sf/joafip/asm/ClassAdapter.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -36,6 +36,7 @@
*
* @author Eric Bruneton
*/
+@SuppressWarnings("PMD")
public class ClassAdapter implements ClassVisitor {
/**
Modified: trunk/joafip-asm/net/sf/joafip/asm/MethodAdapter.java
===================================================================
--- trunk/joafip-asm/net/sf/joafip/asm/MethodAdapter.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-asm/net/sf/joafip/asm/MethodAdapter.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -37,6 +37,7 @@
*
* @author Eric Bruneton
*/
+@SuppressWarnings("PMD")
public class MethodAdapter implements MethodVisitor {
/**
Modified: trunk/joafip-asm/pom.xml
===================================================================
--- trunk/joafip-asm/pom.xml 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-asm/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
@@ -7,7 +7,7 @@
<version>1.0.0</version>
<relativePath>../joafip-parent</relativePath>
</parent>
- <groupId>net.sf.joafip</groupId>
+ <!-- <groupId>net.sf.joafip</groupId> -->
<artifactId>joafip-asm</artifactId>
<packaging>jar</packaging>
<version>4.0.0b8</version>
Modified: trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/ClassAdapter.java
===================================================================
--- trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/ClassAdapter.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/ClassAdapter.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -36,6 +36,7 @@
*
* @author Eric Bruneton
*/
+@SuppressWarnings("PMD")
public class ClassAdapter implements ClassVisitor {
/**
Modified: trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/MethodAdapter.java
===================================================================
--- trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/MethodAdapter.java 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/MethodAdapter.java 2012-01-02 08:09:03 UTC (rev 2986)
@@ -37,6 +37,7 @@
*
* @author Eric Bruneton
*/
+@SuppressWarnings("PMD")
public class MethodAdapter implements MethodVisitor {
/**
Modified: trunk/joafip-callback/pom.xml
===================================================================
--- trunk/joafip-callback/pom.xml 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-callback/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
@@ -7,7 +7,7 @@
<version>1.0.0</version>
<relativePath>../joafip-parent</relativePath>
</parent>
- <groupId>net.sf.joafip</groupId>
+ <!-- <groupId>net.sf.joafip</groupId> -->
<artifactId>joafip-callback</artifactId>
<packaging>jar</packaging>
<version>4.0.0b8</version>
Modified: trunk/joafip-collection/pom.xml
===================================================================
--- trunk/joafip-collection/pom.xml 2011-11-29 02:00:43 UTC (rev 2985)
+++ trunk/joafip-collection/pom.xml 2012-01-02 08:09:03 UTC (rev 2986)
@@ -7,7 +7,7 @@
<version>1.0.0</version>
<relat...
[truncated message content] |
|
From: <luc...@us...> - 2012-01-02 08:09:11
|
Revision: 2986
http://joafip.svn.sourceforge.net/joafip/?rev=2986&view=rev
Author: luc_peuvrier
Date: 2012-01-02 08:09:03 +0000 (Mon, 02 Jan 2012)
Log Message:
-----------
warning correction. changed to eclipse maven project
Modified Paths:
--------------
trunk/joafip/pom.xml
trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
trunk/joafip/src/test/java/net/sf/joafip/AbstractJoafipTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestSerializable.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerCheckerFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerMultiFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestMultiAccessFilePersistence.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestSaveFailureDoNotModifyStorage.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestStoreNotStorable.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFileCheckPersistenceForTest.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractFilePersistenceForTest.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/AbstractTestSerializableAndNotLazy.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy1.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/TestSerializeAndNotLazy2.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestArraySerialization.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerialize.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSerializeReadWriteMethod.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionSubstitutedSerializable.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestSubstitutionWithDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel301/AbstractTestRuntime300.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestFileManagementOptions.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestLinkManagementInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestNoGarbageInMemory.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestObjectReferenceLinkInFile.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileDirectNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassFileLazyNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreForPersistenteClassMemoryLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobFileLazyNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryDirect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithBobMemoryLazy.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/AbstractTestPersistableCodeGenerator.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/TestStoreCollectionWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionArrayListNosubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/nosubs/TestStoreCollectionLinkedListNosubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionArrayListSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashMapSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionHashTableSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedHashSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionLinkedListSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeMapSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionTreeSetSubsWithG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsNoG.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/collection/subs/TestStoreCollectionVectorSubsWithG.java
trunk/joafip-4test/pom.xml
trunk/joafip-asm/net/sf/joafip/asm/ClassAdapter.java
trunk/joafip-asm/net/sf/joafip/asm/MethodAdapter.java
trunk/joafip-asm/pom.xml
trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/ClassAdapter.java
trunk/joafip-asm/src-asm-embedded-3.2/net/sf/joafip/asm/MethodAdapter.java
trunk/joafip-callback/pom.xml
trunk/joafip-collection/pom.xml
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractIteratorTest.java
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractLinkedListTest.java
trunk/joafip-collection/src/test/java/net/sf/joafip/java/util/AbstractListTest.java
trunk/joafip-common/pom.xml
trunk/joafip-common/src/main/java/net/sf/joafip/logger/JoafipLogger.java
trunk/joafip-example-database/pom.xml
trunk/joafip-example-hugemap/pom.xml
trunk/joafip-example-simplestore/pom.xml
trunk/joafip-file/pom.xml
trunk/joafip-heapfile/pom.xml
trunk/joafip-java-agent/pom.xml
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityManager.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityManagerFactory.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipEntityTransaction.java
trunk/joafip-jpa/src/main/java/net/sf/joafip/jpa/JoaFipPersistenceProvider.java
trunk/joafip-jpa/src/test/java/examples/Product.java
trunk/joafip-jpa/src/test/java/examples/SimpleJPA.java
trunk/joafip-log4j/pom.xml
trunk/joafip-meminspector/pom.xml
trunk/joafip-rbtree/pom.xml
trunk/joafip-testsuite/pom.xml
Added Paths:
-----------
trunk/joafip-parent/.settings/
trunk/joafip-parent/.settings/org.eclipse.core.resources.prefs
trunk/joafip-parent/.settings/org.eclipse.m2e.core.prefs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-29 02:00:53
|
Revision: 2985
http://joafip.svn.sourceforge.net/joafip/?rev=2985&view=rev
Author: luc_peuvrier
Date: 2011-11-29 02:00:43 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
chat link added
Modified Paths:
--------------
web/collections/collection.html
web/conversion/conversion.html
web/data_model_change/data_model_change.html
web/database/dbvsjoafip.html
web/export_import/export_import.html
web/faq/faq.html
web/fr/collections/collection.html
web/fr/database/dbvsjoafip.html
web/fr/howitworks/howitworks.html
web/fr/index.html
web/fr/opposite.html
web/fr/presentation/autosave.html
web/fr/presentation/features.html
web/fr/presentation/ppojo.html
web/howitworks/datarecord.html
web/howitworks/graph_in_key_value_store.html
web/howitworks/howitworks.html
web/impl/heapfile/heapfile.html
web/impl/memoryleak/memoryleak.html
web/impl/proxy/proxy.html
web/impl/treelist/treelist.html
web/irc.freenode.net.joafip.html
web/maven.html
web/olderweb.html
web/opposite.html
web/perf/perf.html
web/presentation/autosave.html
web/presentation/descriptor.html
web/presentation/features.html
web/presentation/javaagent.html
web/presentation/ppojo.html
web/presentation/properties.html
web/presentation/specificfile_io.html
web/presentation/states.html
web/sample/sample.html
web/sources.html
Modified: web/collections/collection.html
===================================================================
--- web/collections/collection.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/collections/collection.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -5,7 +5,9 @@
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Win32)">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20091217;12402900"><meta content="luc peuvrier" name="author"></head>
+<meta name="CHANGED" content="20091217;12402900">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -13,13 +15,29 @@
google_ad_slot = "2109077196";
google_ad_width = 468;
google_ad_height = 60;
-//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br></div><hr style="width: 100%; height: 2px;"><a href="../fr/collections/collection.html">En Français</a><br><h1>Joafip persistable collections</h1>
-<p>Java native collection implementation ( or GNU Trove collection for example)
+//--></script>
+<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
+</div>
+<hr style="width: 100%; height: 2px;"><a href="../fr/collections/collection.html">En Français</a><br>
+<h1>Joafip persistable collections</h1>
+<p>Java native collection implementation ( or GNU Trove
+collection for example)
can
-be persisted by JOAFIP since it can invoke their serialization methods, or <a href="../javadoc/net/sf/joafip/service/IFilePersistence.html#setSubstitutionOfJavaUtilCollection%28%29">substituted
-at write</a>.<br>But
+be persisted by JOAFIP since it can invoke their serialization methods,
+or <a href="../javadoc/net/sf/joafip/service/IFilePersistence.html#setSubstitutionOfJavaUtilCollection%28%29">substituted
+at write</a>.<br>
+But
these implementations are not the best for an efficient lazy
-load and for few memory usage. <br>JOAFIP collections have additionals features.<br>
+load and for few memory usage. <br>
+JOAFIP collections have additionals features.<br>
<br>
So the below collection are provided by JOAFIP to have a
more efficient persistence:</p>
@@ -56,9 +74,21 @@
PLinkedHashMap when keys are comparable</p>
<p>Iterators instance are also persistable.</p>
<p>Arrays are not good for
-lazy load efficiency because it load all array in memory, this is
+lazy load efficiency because it load all array in memory, this
+is
bad for memory usage in case of lot of data. Array list and Sun hash
based collections internaly use array. Alternatives are PTreeList and
JOAFIP hash based collection implementations.</p>
-<p><br></p><hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br></div><hr style="width: 100%; height: 2px;">© 2007-2011, joafip
+<p><br>
+</p>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
+</div>
+<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/conversion/conversion.html
===================================================================
--- web/conversion/conversion.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/conversion/conversion.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -1,5 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html style="direction: ltr;" lang="en-us"><head><script></script>
+<html style="direction: ltr;" lang="en-us"><head>
+<script></script>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title>conversion</title>
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Win32)">
@@ -7,7 +8,9 @@
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
<meta name="CHANGED" content="20091217;12410400">
-<meta name="DESCRIPTION" content="conversion for import and data model change"><meta content="luc peuvrier" name="author"></head>
+<meta name="DESCRIPTION" content="conversion for import and data model change">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -21,10 +24,18 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
-<p><a href="../index.html#conversion">BACK TO THE INDEX</a></p>
-<a href="../fr/index.html#conversion">RETOUR A L'INDEX</a><br><h1>Conversion for import and data model change (since 3.0.0)</h1>
+<p><a href="../index.html#conversion">BACK TO THE
+INDEX</a></p>
+<a href="../fr/index.html#conversion">RETOUR A L'INDEX</a><br>
+<h1>Conversion for import and data model change (since 3.0.0)</h1>
<h2>Conversion definition example</h2>
<p>to be done<br>
<img style="border: 0px solid ; width: 554px; height: 54px;" alt="mail" src="../images/mail.gif" name="images1"></p>
@@ -140,6 +151,12 @@
</p>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<p style="margin-bottom: 0cm;">© 2007-2011, joafip</p>
Modified: web/data_model_change/data_model_change.html
===================================================================
--- web/data_model_change/data_model_change.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/data_model_change/data_model_change.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -6,7 +6,9 @@
<meta name="AUTHOR" content="luc peuvrier">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20091217;12413400"><meta content="luc peuvrier" name="author"></head>
+<meta name="CHANGED" content="20091217;12413400">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -20,10 +22,18 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
-<p><a href="../index.html#dataModelChange">BACK TO THE INDEX</a></p>
-<a href="../fr/index.html#dataModelChange">RETOUR A L'INDEX</a><br><h1>JOAFIP data model change</h1>
+<p><a href="../index.html#dataModelChange">BACK TO
+THE INDEX</a></p>
+<a href="../fr/index.html#dataModelChange">RETOUR A L'INDEX</a><br>
+<h1>JOAFIP data model change</h1>
<p>During application life cycle the persisted data model can
change.<br>
<br>
@@ -61,6 +71,12 @@
</p>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<hr style="width: 100%; height: 2px;">
Modified: web/database/dbvsjoafip.html
===================================================================
--- web/database/dbvsjoafip.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/database/dbvsjoafip.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -5,7 +5,8 @@
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Win32)">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20100203;7464300"></head>
+<meta name="CHANGED" content="20100203;7464300">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -19,10 +20,17 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<p><a href="../index.html#mdatabase">BACK</a> </p>
-<a href="../fr/database/dbvsjoafip.html">En Français</a><br><h1>Database versus JOAFIP</h1>
+<a href="../fr/database/dbvsjoafip.html">En Français</a><br>
+<h1>Database versus JOAFIP</h1>
<p>This page is to give you an idea how simple it is to use
JOAFIP to
create your own database.</p>
@@ -32,7 +40,8 @@
table entity. In our example the record entity will be an
Item whose
attributes are the item code and price.</p>
-<p>In fact it is only a data model instance in memory that will be
+<p>In fact it is only a data model instance in memory that will
+be
persisted.</p>
<h2>UML class diagram of our data model (simple example) </h2>
<p style="margin-left: 1.06cm;"> <img style="border: 0px solid ; width: 471px; height: 192px;" alt="item table" src="../images/itemtable.png" name="images1"><br>
@@ -322,7 +331,8 @@
<span style="font-family: monospace;">builder.setGarbageManagement(false);</span><br style="font-family: monospace;">
<span style="font-family: monospace;">builder.setCrashSafeMode(false);</span><br style="font-family: monospace;">
<span style="font-family: monospace;">final
-IFilePersistence filePersistence = builder.build();<br></span><font face="monospace">
+IFilePersistence filePersistence = builder.build();<br>
+</span><font face="monospace">
............</font><br>
<font face="monospace">/* close file persistence */</font><br>
<font face="monospace">filePersistence.close();</font></div>
@@ -353,7 +363,8 @@
session
saving mode to replicate change in memory to storage file.</p>
<p style="margin-left: 2.12cm; margin-bottom: 0cm;"><font face="monospace">session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">in case of
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">in
+case of
read only access, close session not replicate change in memory to
storage file, this can be a kind of rollback.</p>
<p style="margin-left: 2.12cm;"><font face="monospace">session.close(EnumFilePersistenceCloseAction.DO_NOT_SAVE);</font></p>
@@ -372,7 +383,8 @@
<p style="margin-left: 1.06cm; margin-bottom: 0cm;">add
Item class
instance to stored ItemTable instance will persist these Item object</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* populate
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+populate
item table */</font><br>
<font face="monospace">session.open();</font><br>
<font face="monospace">itemTable
@@ -421,7 +433,8 @@
objects
is just as easy as get object in memory, call modifier method, and
then close data access session saving.</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* update
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+update
*/</font><br>
<font face="monospace">session.open();</font><br>
<font face="monospace">itemTable
@@ -435,7 +448,8 @@
<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Deleting
objects
is just as easy as for update.</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* delete
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+delete
*/<br>
session.open();<br>
itemTable = (ItemTable)
@@ -458,9 +472,16 @@
navigating in object graph constituted of table of data entity.<br>
<br>
<a href="../sample/sample.html#database">get
-full sources</a></p><p style="margin-left: 1.06cm; margin-bottom: 0cm;"><a href="../sample/sample.html#database"></a></p>
+full sources</a></p>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;"></p>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/export_import/export_import.html
===================================================================
--- web/export_import/export_import.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/export_import/export_import.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -6,7 +6,9 @@
<meta name="AUTHOR" content="luc peuvrier">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20091217;12435300"><meta content="luc peuvrier" name="author"></head>
+<meta name="CHANGED" content="20091217;12435300">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -20,10 +22,18 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
-<p><a href="../index.html#import_export">BACK TO THE INDEX</a></p>
-<a href="../fr/index.html#import_export">RETOUR A L'INDEX</a><br><h1>JOAFIP export / import</h1>
+<p><a href="../index.html#import_export">BACK TO THE
+INDEX</a></p>
+<a href="../fr/index.html#import_export">RETOUR A L'INDEX</a><br>
+<h1>JOAFIP export / import</h1>
<p><a href="../schema/index.html">xml shemas
for JOAFIP</a></p>
<h2>Why for ?</h2>
@@ -106,7 +116,14 @@
<br>
<br>
</p>
-<hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/faq/faq.html
===================================================================
--- web/faq/faq.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/faq/faq.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -17,6 +17,12 @@
</script> <a href="../index.html#faq">BACK</a>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<h1>Frequently Asked Questions</h1>
@@ -26,8 +32,15 @@
<h2><a name="1"></a>1) saving is slow</h2>
Activation
of file cache really boost file access speed. You should try different
-cache size to find the best compromise between speed and memory usage
-<hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+cache size to find the best compromise between speed and memory usage<br><br>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
+<big><big><a href="../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/fr/collections/collection.html
===================================================================
--- web/fr/collections/collection.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/fr/collections/collection.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -1,11 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html style="direction: ltr;" lang="fr-fr"><head>
+<script></script>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8"><title>joafip persistable collection</title>
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Win32)">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20091217;12402900"><meta content="luc peuvrier" name="author"></head>
+<meta name="CHANGED" content="20091217;12402900">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -13,17 +16,37 @@
google_ad_slot = "2109077196";
google_ad_width = 468;
google_ad_height = 60;
-//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br></div><hr style="width: 100%; height: 2px;"><a href="../../collections/collection.html">In English</a><br><h1>Joafip persistable collections</h1>
-<p>Les collections natives JAVA (ou les GNU Trove par exemple) peuvent
+//--></script>
+<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
+</div>
+<hr style="width: 100%; height: 2px;"><a href="../../collections/collection.html">In English</a><br>
+<h1>Joafip persistable collections</h1>
+<p>Les collections natives JAVA (ou les GNU Trove par exemple)
+peuvent
être persistées par JOAFIP qui peut invoquer leurs méthodes de
-sérialisation, ou encore faire une <a href="../../javadoc/net/sf/joafip/service/IFilePersistence.html#setSubstitutionOfJavaUtilCollection%28%29">substitution à l'ecriture</a>.<br>Mais
+sérialisation, ou encore faire une <a href="../../javadoc/net/sf/joafip/service/IFilePersistence.html#setSubstitutionOfJavaUtilCollection%28%29">substitution
+à l'ecriture</a>.<br>
+Mais
ces implémentations ne sont pas les meilleurs pour avoir un lazy load
-plus efficace et une plus petite utilisation de la mémoire.<br>Les collections JOAFIP ont des fonctionalités supplémentaires.</p><p>Ci-dessous les collections fournis avec joafip pour une meilleure persistance:</p>
+plus efficace et une plus petite utilisation de la mémoire.<br>
+Les collections JOAFIP ont des fonctionalités supplémentaires.</p>
+<p>Ci-dessous les collections fournis avec joafip pour une
+meilleure persistance:</p>
<p style="margin-left: 1.06cm; margin-bottom: 0cm;">PLinkedList
(*) - liste chainée, voir l'alteranative PTreeList<br>
PTreeList (*)(**) - liste chainée arborescente<br>
-PArrayList (*) (**)- liste tableau, voir l'alteranative PTreeList<br>
-PLinkedHashSet (*)(**) - l'équivalent de LinkedHashSet, voir aussi PLinkedTreeSet quand les élément sont comparables<br>
+PArrayList (*) (**)- liste tableau, voir
+l'alteranative PTreeList<br>
+PLinkedHashSet (*)(**) - l'équivalent de LinkedHashSet, voir
+aussi PLinkedTreeSet quand les élément sont comparables<br>
PLinkedTreeSet (**) - un TreeSet où l'ordre des éléménents est géré.<br>
PHashSet
(*)<br>
@@ -32,23 +55,42 @@
PHashMap (*)<br>
PTreeMap<br>
</p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm; font-weight: bold;">fonctionnalité additionnelle de
+<p style="margin-left: 1.06cm; margin-bottom: 0cm; font-weight: bold;">fonctionnalité
+additionnelle de
JOAFIP:</p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">toutes sont "écoutables", accepte un listener<br>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">toutes
+sont "écoutables", accepte un listener<br>
(*) une implementation de IEqualsHashComparator
-peut être utilisé pour ne pas utiliser les méthodes equals/hashcode des objets stockés<br>
+peut être utilisé pour ne pas utiliser les
+méthodes equals/hashcode des objets stockés<br>
(**) implementents aussi Deque and List</p>
-<p style="margin-left: 40px;">d'autres implémentation des inteface de collection:</p>
+<p style="margin-left: 40px;">d'autres implémentation des
+inteface de collection:</p>
<p style="margin-bottom: 0cm; margin-left: 2.11cm;">PTreeList,
une
alternative à ArrayList et LinkedList<br>
PLinkedTreeSet, une alternative à
-LinkedHashSet et PLinkedHashSet quand les éléments sont comparables<br>
+LinkedHashSet et PLinkedHashSet quand les éléments
+sont comparables<br>
PLinkedTreeMap, une alternative à LinkedHashMap et
PLinkedHashMap quand les clés sont comparables</p>
<p>Les instances des itérateurs sont aussi persistables.</p>
-<p>Les tableaux ne sont pas bon pour le lazy load car tout le tableau
+<p>Les tableaux ne sont pas bon pour le lazy load car tout le
+tableau
est chargé en mémoire, cela donne une mauvaise utilisation de la
mémoire quand il y a beaucoup de données. Les ArrayList et collections
-basé sur des hashtable utilisent en interne un tableau.<br>Les alternatives PTreeList et hash collections de JOAFIP sont basés sur des collections.</p><p></p><hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br></div><hr style="width: 100%; height: 2px;">© 2007-2011, joafip
+basé sur des hashtable utilisent en interne un tableau.<br>
+Les alternatives PTreeList et hash collections de JOAFIP sont basés sur
+des collections.</p>
+<p></p>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
+</div>
+<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/fr/database/dbvsjoafip.html
===================================================================
--- web/fr/database/dbvsjoafip.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/fr/database/dbvsjoafip.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -5,7 +5,8 @@
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Win32)">
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
-<meta name="CHANGED" content="20100203;7464300"></head>
+<meta name="CHANGED" content="20100203;7464300">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -19,21 +20,37 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<p><a href="../index.html#mdatabase">BACK</a> </p>
-<a href="../../database/dbvsjoafip.html">In English</a><br><h1>Database versus JOAFIP</h1>
-<p>Cette page est pour vous donner une idée de comment il est siple de créer une "base de données" avec JOAFIP.</p>
-<p>Nous allong apprendre comment ouvrir, stocker, retrouver et effacer
+<a href="../../database/dbvsjoafip.html">In English</a><br>
+<h1>Database versus JOAFIP</h1>
+<p>Cette page est pour vous donner une idée de comment il est
+siple de créer une "base de données" avec JOAFIP.</p>
+<p>Nous allong apprendre comment ouvrir, stocker, retrouver et
+effacer
des instance de d'enregistrement dans une table persistance
d'enregistrement. Dans notre exemple l'enregistrement sera de la classe
-Item qui a code et price comme attributs.</p><p>En fait c'est l'instance d'un modèle de données qui sera persisté.</p>
-<h2>Diagramme de classe UML pour notre modèle de données (exemple simple) </h2>
-<p style="margin-left: 1.06cm;"> <img style="border: 0px solid ; width: 471px; height: 192px;" alt="item table" src="../../images/itemtable.png" name="images1"><br>La relation
-de composition entre ItemTable et Item est réalisée en utilisant PTreeMap<br>
-<a href="../collections/collection.html">autres collections utilisables pour les relations à cardinalités multiples</a></p>
+Item qui a code et price comme attributs.</p>
+<p>En fait c'est l'instance d'un modèle de données qui sera
+persisté.</p>
+<h2>Diagramme de classe UML pour notre modèle de
+données (exemple simple) </h2>
+<p style="margin-left: 1.06cm;"> <img style="border: 0px solid ; width: 471px; height: 192px;" alt="item table" src="../../images/itemtable.png" name="images1"><br>
+La relation
+de composition entre ItemTable et Item est réalisée en
+utilisant PTreeMap<br>
+<a href="../collections/collection.html">autres
+collections utilisables pour les relations à cardinalités multiples</a></p>
<h2>La classe Item</h2>
-<p style="margin-left: 1.06cm;">Une simple classe avec deux champs:
+<p style="margin-left: 1.06cm;">Une simple classe avec
+deux champs:
code and price.</p>
<p style="margin-left: 2cm;"><font face="monospace">/**</font><br>
<font face="monospace">*
@@ -130,7 +147,8 @@
<font face="monospace">}</font><br>
<font face="monospace">}</font></p>
<h2>La classe ItemTable</h2>
-<p style="margin-left: 1.06cm;">La table d'Item sera persistée.</p>
+<p style="margin-left: 1.06cm;">La table d'Item sera
+persistée.</p>
<p style="margin-left: 2.12cm;"><font face="monospace">public
class
ItemTable {</font><br>
@@ -290,10 +308,13 @@
<font face="monospace">}</font><br>
<font face="monospace">}</font></p>
<h2>Opening the "database"</h2>
-<p style="margin-left: 1.06cm;">Pour accéder au fichier de stockage ou
+<p style="margin-left: 1.06cm;">Pour accéder au fichier de
+stockage ou
créer un nouveau gestionnaire de persistance en donnat le chemin du
répertoire de stockage. La "data access session" est la façade pour
-gérer les objets dans le fichier de stockage.</p><p style="margin-left: 2.12cm;"><font face="monospace">depuis 4.0.0<br>
+gérer les objets dans le fichier de stockage.</p>
+<p style="margin-left: 2.12cm;"><font face="monospace">depuis
+4.0.0<br>
</font></p>
<div style="margin-left: 120px;"><span style="font-family: monospace;">/* open file
persistence */</span><br style="font-family: monospace;">
@@ -305,11 +326,13 @@
<span style="font-family: monospace;">builder.setGarbageManagement(false);</span><br style="font-family: monospace;">
<span style="font-family: monospace;">builder.setCrashSafeMode(false);</span><br style="font-family: monospace;">
<span style="font-family: monospace;">final
-IFilePersistence filePersistence = builder.build();<br></span><font face="monospace">
+IFilePersistence filePersistence = builder.build();<br>
+</span><font face="monospace">
............</font><br>
<font face="monospace">/* close file persistence */</font><br>
<font face="monospace">filePersistence.close();</font></div>
-<p style="margin-left: 2.12cm;"><font face="monospace">avant 4.0.0<br>
+<p style="margin-left: 2.12cm;"><font face="monospace">avant
+4.0.0<br>
</font></p>
<div style="margin-left: 120px;"><font face="monospace">/*
open file
@@ -327,14 +350,21 @@
<font face="monospace">filePersistence.close();</font></div>
<p style="margin-left: 2.12cm;"></p>
<h2>Ouvrir une session d'accés aux données</h2>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">ouvrir une session pour des opération CRUD ( Create Read Update Delete ).</p>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">ouvrir
+une session pour des opération CRUD ( Create Read Update
+Delete ).</p>
<p style="margin-left: 2.12cm;"><font face="monospace">session.open();</font></p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">fermeture de la session avec sauvegarde pour répliquer les changements en mémoire dans le fichier de stockage.</p>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">fermeture
+de la session avec sauvegarde pour répliquer les changements en mémoire
+dans le fichier de stockage.</p>
<p style="margin-left: 2.12cm; margin-bottom: 0cm;"><font face="monospace">session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">En cas d'accés en lecture seule, fermer la session sans suavegarder, cela peut être une sorte de rollback.</p>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">En cas
+d'accés en lecture seule, fermer la session sans suavegarder, cela peut
+être une sorte de rollback.</p>
<p style="margin-left: 2.12cm;"><font face="monospace">session.close(EnumFilePersistenceCloseAction.DO_NOT_SAVE);</font></p>
<h2>Stocker un objet</h2>
-<p style="margin-left: 1.06cm;">stocker une instance de ItemTable</p>
+<p style="margin-left: 1.06cm;">stocker une instance
+de ItemTable</p>
<p style="margin-left: 2.12cm;"><font face="monospace">/*
store new
item table (empty) */</font><br>
@@ -344,8 +374,11 @@
<font face="monospace">session.setObject("itemTable",
itemTable);</font><br>
<font face="monospace">session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">ajouter des instance de Item dans l'instance de ItemTable fera persister ces item</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* populate
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">ajouter
+des instance de Item dans l'instance de ItemTable fera persister ces
+item</p>
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+populate
item table */</font><br>
<font face="monospace">session.open();</font><br>
<font face="monospace">itemTable
@@ -362,8 +395,10 @@
<font face="monospace">itemTable.addItem(item);</font><br>
<font face="monospace">session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
<h2>Retrouver un objet</h2>
-<p style="margin-left: 1.06cm;">Joafip n'a pas de système de requête,
-mais ItemTable implemente ce qui est nécessaire pour retrouver un
+<p style="margin-left: 1.06cm;">Joafip n'a pas de système
+de requête,
+mais ItemTable implemente ce qui est nécessaire pour retrouver
+un
objet, tout se passe au travers des méthodes d'accès.</p>
<p style="margin-left: 2.12cm;"><font face="monospace">/*
retrieve by
@@ -389,8 +424,11 @@
_log.info("retrieved
by code 456:" + item);</font></p>
<h2>Mise à jour d'un objet</h2>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Mettre à jour consiste à retrouver l'objet, appeler une méthode de modification, et ensuite fermer la session en sauvegardant.</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* update
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Mettre
+à jour consiste à retrouver l'objet, appeler une méthode de
+modification, et ensuite fermer la session en sauvegardant.</p>
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+update
*/</font><br>
<font face="monospace">session.open();</font><br>
<font face="monospace">itemTable
@@ -401,8 +439,10 @@
<font face="monospace">item.setPrice(9);</font><br>
<font face="monospace">session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
<h2>Effacement d'un objet</h2>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Effacer est tout aussi facile que mettre à jour.</p>
-<p style="margin-left: 2.12cm;"><font face="monospace">/* delete
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Effacer
+est tout aussi facile que mettre à jour.</p>
+<p style="margin-left: 2.12cm;"><font face="monospace">/*
+delete
*/<br>
session.open();<br>
itemTable = (ItemTable)
@@ -413,20 +453,31 @@
+ item);<br>
session.close(EnumFilePersistenceCloseAction.SAVE);</font></p>
<h2>Conclusion</h2>
-<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Des requêtes plus
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;">Des
+requêtes plus
complexes peuvent être ajoutées en implemantant des méthodes d'accées
et modification à la classe ItemTable
class.<br>
-<br>Il est possible de créer une classe base de données composée de
-multiples tables. Cette classe DataBase class peut jouer le rôle
+<br>
+Il est possible de créer une classe base de données composée de
+multiples tables. Cette classe DataBase class peut jouer le
+rôle
de façade d'accès aux donners pour stocker, retrouver, mettre à jour,
et effacer des instances. Cette façade peut implémenter un ensemble de
méthodes pour des requêtes complexes, tout cela en java via navigation
dans le graphe d'objet constitué des tables d'entités.<br>
<br>
-<a href="../../sample/sample.html#database">toutes les sources</a></p><p style="margin-left: 1.06cm; margin-bottom: 0cm;"><a href="../sample/sample.html#database"></a></p>
+<a href="../../sample/sample.html#database">toutes les
+sources</a></p>
+<p style="margin-left: 1.06cm; margin-bottom: 0cm;"></p>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/fr/howitworks/howitworks.html
===================================================================
--- web/fr/howitworks/howitworks.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/fr/howitworks/howitworks.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -7,7 +7,9 @@
<meta name="CREATED" content="0;0">
<meta name="CHANGEDBY" content="luc peuvrier">
<meta name="CHANGED" content="20091217;12473900">
-<meta name="DESCRIPTION" content="describes how joafip works"><meta content="luc peuvrier" name="author"></head>
+<meta name="DESCRIPTION" content="describes how joafip works">
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr;">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -21,26 +23,46 @@
</script>
<hr style="width: 100%; height: 2px;">
<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">
<p><a href="../index.html#mhow">BACK</a></p>
-<a href="../../howitworks/howitworks.html">In English</a><br><h1>Comment JOAFIP marche</h1>L'état d'un objet est stocké dans une <a href="../../howitworks/datarecord.html">enregistrement</a> au travers d'un <a href="../../howitworks/heap.html">tas dans un fichier.</a>(stockage clé/valeur)<br>
+<a href="../../howitworks/howitworks.html">In English</a><br>
+<h1>Comment JOAFIP marche</h1>
+L'état d'un objet est stocké dans une <a href="../../howitworks/datarecord.html">enregistrement</a>
+au travers d'un <a href="../../howitworks/heap.html">tas
+dans un fichier.</a>(stockage clé/valeur)<br>
<br>
-<a href="../../howitworks/graph_in_key_value_store.html">Comment un graphe d'objet peut être enregistré dans un stockage clé/valeur</a>
-<br><br>La gestion de la persistance utilise des informations associées aux objets lus du fichier.<br>Cela
+<a href="../../howitworks/graph_in_key_value_store.html">Comment
+un graphe d'objet peut être enregistré dans un stockage clé/valeur</a>
+<br>
+<br>
+La gestion de la persistance utilise des informations associées aux
+objets lus du fichier.<br>
+Cela
est fait en utilisant une map en mémoire où pour chaque entrée la clé
est l'identité système de l'objet et la valeur est les informations de
-persistance.<br>Les informations principales associées à un objet
+persistance.<br>
+Les informations principales associées à un objet
sont l'identificateur d'enregistrement dans le "tas fichier" et l'état
-de l'objet à la lecture.<br><h2>CRUD (Create Read Update Delete):</h2>
+de l'objet à la lecture.<br>
+<h2>CRUD (Create Read Update Delete):</h2>
<h3 style="margin-left: 1.06cm;">CUD (Create Update
Delete) de CRUD :</h3>
-<p style="margin-left: 2.12cm;">Les créations, mise à jour, effacement
+<p style="margin-left: 2.12cm;">Les créations, mise à
+jour, effacement
sont faites à la sauvegarde dans le fichier. Le process de sauvegarde
visites les objets du graph à partir de l'objet racine. </p>
-<p style="margin-left: 2.12cm;">A la visite, pour chaque objet compare à l'état à lecture dans le fichier:<br>
+<p style="margin-left: 2.12cm;">A la visite, pour chaque
+objet compare à l'état à lecture dans le fichier:<br>
-
-<b>Create</b>: si l'objet est nouveau (pas d'état de lecture dans le fichier),
+<b>Create</b>: si l'objet est nouveau (pas d'état de
+lecture dans le fichier),
alors il est sauvé dans un nouvel enregistrement dans le fichier.<br>
- <b>Update</b>:
si l'état de l'objet à changé alors son enregistrement dans le fichier
@@ -52,85 +74,135 @@
d'objet)</p>
<h3 style="margin-left: 1.06cm;">R ( Read ) de
CRUD </h3>
-<p style="margin-left: 2.12cm;">C'est ici que les proxy sont utilisé
+<p style="margin-left: 2.12cm;">C'est ici que les proxy
+sont utilisé
pour ne pas gaspiller de mémoire, pas de vérification s'il y a assez de
mémoire, mais cré plutôt un proxy pour economiser de la mémoire puisque
-ce dernier ne référencera aucun autre objet tant qu'il n'est pas
-accédé.<br>L'objet racine est le premier à être crée en mémoire.<br>L'accés à un object est toujours fait en navigant à partir de l'objet racine, un object proxy est toujours retourné.<br>L'interception des appels aux méthode provoque le chargement de l'état de l'objet par lecture du fichier.</p>
+ce dernier ne référencera aucun autre objet tant qu'il n'est
+pas
+accédé.<br>
+L'objet racine est le premier à être crée en mémoire.<br>
+L'accés à un object est toujours fait en navigant à partir de l'objet
+racine, un object proxy est toujours retourné.<br>
+L'interception des appels aux méthode provoque le chargement de l'état
+de l'objet par lecture du fichier.</p>
<h3 style="margin-left: 1.06cm;">Collections</h3>
-<p style="margin-left: 2.12cm;">Comme les instance de collections sont des graphes d'objets, le même mécanisme est appliqué. <br>Mais certaines implémentation de respectent pas les <a href="presentation/ppojo.html">conditions</a>
-sur les classes imposées par joafip. Ces conditions sont imposées par l'utilisation des proxy..</p>
-<p style="margin-left: 2.12cm;">A cause de ces condistions joafip a sa propre implémentation des collections.</p>
-<p style="margin-left: 2.12cm;">Mais aussi parce que l'implémentation
+<p style="margin-left: 2.12cm;">Comme les instance de
+collections sont des graphes d'objets, le même mécanisme est appliqué. <br>
+Mais certaines implémentation de respectent pas les <a href="presentation/ppojo.html">conditions</a>
+sur les classes imposées par joafip. Ces conditions sont imposées par
+l'utilisation des proxy..</p>
+<p style="margin-left: 2.12cm;">A cause de ces condistions
+joafip a sa propre implémentation des collections.</p>
+<p style="margin-left: 2.12cm;">Mais aussi parce que
+l'implémentation
de JOAFIP permet une "lazy load" plus efficace (par exemple, le cas des
-implémentatio native java de HashMap et de HashSet - même
+implémentatio native java de HashMap et de HashSet -
+même
choses pour les implémentations GNU Trove).<br>
</p>
-<p style="margin-left: 2.12cm;">Depuis la version 2.0.0, JOAFIP
+<p style="margin-left: 2.12cm;">Depuis la
+version 2.0.0, JOAFIP
peut invoquer les méthodes de sérialisation implémentées dans la
classe, ainsi il peut persisté les implémentations de collections
natives, mais ce n'est pas le mieux pour une bonne gestion du lazy load.</p>
<h2>Exemple:</h2>
-<p>Ci-après une description de comment sont persistés les objets dans le fichier.<br>
-<br>A l'ouverture de la session d'accès aux données, l'objet racine est
+<p>Ci-après une description de comment sont persistés les objets
+dans le fichier.<br>
+<br>
+A l'ouverture de la session d'accès aux données, l'objet racine est
chargé en mémoire. Le rôle de l'objet racine est de référencer les
-autres objets persistés.<br>Le gestionnaire de session d'accès aux données a deux methodes pour gérer les objets persistés référencés par l'objet racine.<br>
+autres objets persistés.<br>
+Le gestionnaire de session d'accès aux données a deux methodes pour
+gérer les objets persistés référencés par l'objet racine.<br>
<br>
<img style="border: 0px solid ; width: 490px; height: 168px;" alt="storage" src="../../images/joafip1.png" name="images1"><br>
-<br>Pour pouvoir persister un graphe d'object il doit être référencé par l'objet racine. <br>
<br>
-<img style="border: 0px solid ; width: 490px; height: 285px;" alt="storage" src="../../images/joafip2.png" name="images2"><br>La
+Pour pouvoir persister un graphe d'object il doit être référencé par
+l'objet racine. <br>
+<br>
+<img style="border: 0px solid ; width: 490px; height: 285px;" alt="storage" src="../../images/joafip2.png" name="images2"><br>
+La
fermeture de la session d'accès aux données, avec l'option de
-sauvegarde, fait persister le graphe à partir de l'objet racine.<br>Après
+sauvegarde, fait persister le graphe à partir de l'objet racine.<br>
+Après
cela, relacher (déréférencer) les objets, il n'y aura plus d'objets en
mémoire ( après passage du garbage collector de la JVM ! )<br>
-<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafip3.png" name="images3"><br>Pour accéder à nouveau il n'y a qu'à ouvrier une session qui chargera seulement l'objet racine.<br>
+<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafip3.png" name="images3"><br>
+Pour accéder à nouveau il n'y a qu'à ouvrier une session qui chargera
+seulement l'objet racine.<br>
<br>
-<img style="border: 0px solid ; width: 490px; height: 296px;" alt="storage" src="../../images/joafip4.png" name="images4"><br>La requête de l'objet o1 à l'objet racine qui est djà chargé provoquera une chargement automatique de l'objet o1.</p><p>
-<img style="border: 0px solid ; width: 490px; height: 290px;" alt="storage" src="../../images/joafip5.png" name="images5"><br>
+<img style="border: 0px solid ; width: 490px; height: 296px;" alt="storage" src="../../images/joafip4.png" name="images4"><br>
+La requête de l'objet o1 à l'objet racine qui est djà chargé
+provoquera une chargement automatique de l'objet o1.</p>
+<p><img style="border: 0px solid ; width: 490px; height: 290px;" alt="storage" src="../../images/joafip5.png" name="images5"><br>
</p>
<p>Ci-dessous un exemple .d'opération sur les objets:<br>
</p>
-<div style="margin-left: 40px;">o1 ne référence plus o2:<br>
+<div style="margin-left: 40px;">o1 ne référence
+plus o2:<br>
<div style="margin-left: 40px;">o1.setXXX(null);<br>
-</div>nouvel objet o5 référencé par l'objet o3:<br>
+</div>
+nouvel objet o5 référencé par l'objet o3:<br>
<div style="margin-left: 40px;">o3=o1.getXXX();
o3.setXXX(o5);</div>
</div>
-<p style="margin-left: 40px;">Le proxy permet le chargement automatique de l'état de l'objet puisque une méthode de l'objet a été appelée.</p><p>
-<img style="border: 0px solid ; width: 490px; height: 293px;" alt="storage" src="../../images/joafip6.png" name="images6"><br>A la suauvegarde de la fermeture de session d'accès aux données:</p>
+<p style="margin-left: 40px;">Le proxy permet le
+chargement automatique de l'état de l'objet puisque une méthode de
+l'objet a été appelée.</p>
+<p><img style="border: 0px solid ; width: 490px; height: 293px;" alt="storage" src="../../images/joafip6.png" name="images6"><br>
+A la suauvegarde de la fermeture de session d'accès aux données:</p>
<ul>
<li>
-<p style="margin-bottom: 0cm;">l'enregistrement pour o1 est mis à jour car l'état de o1 a changé </p>
+<p style="margin-bottom: 0cm;">l'enregistrement pour
+o1 est mis à jour car l'état de o1 a changé </p>
</li>
<li>
-<p style="margin-bottom: 0cm;">l'enregistrement pour o3 est mis à jour car l'état de o3 a changé </p>
+<p style="margin-bottom: 0cm;">l'enregistrement pour
+o3 est mis à jour car l'état de o3 a changé </p>
</li>
<li>
-<p style="margin-bottom: 0cm;">o5 est créé dans le fichier </p>
+<p style="margin-bottom: 0cm;">o5 est créé dans le
+fichier </p>
</li>
<li>
<p>l'enregistrement o2 sera libéré par le garbage
collector de joafip </p>
</li>
</ul>
-<p>Après cela plus d'objets en mémoire.</p><p>
-<img style="border: 0px solid ; width: 490px; height: 293px;" alt="storage" src="../../images/joafip7.png" name="images7"><br>Il
+<p>Après cela plus d'objets en mémoire.</p>
+<p><img style="border: 0px solid ; width: 490px; height: 293px;" alt="storage" src="../../images/joafip7.png" name="images7"><br>
+Il
y a le cas où les références entres objets ne changent pas, mais la
modification d'un champ primitif provoque la mise à jour de
l'enregistrement dans le fichier.</p>
<h2>Garbage candidate:</h2>
-<p>Partant d'un graphe d'objet sauvegardé dans le fichier.<br></p><p>
-<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg1.png" name="images8"><br></p><p>puis lecture de l'objet racine<br>
+<p>Partant d'un graphe d'objet sauvegardé dans le fichier.<br>
+</p>
+<p><img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg1.png" name="images8"><br>
+</p>
+<p>puis lecture de l'objet racine<br>
<br>
-<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg2.png" name="images9"><br>Et faire que l'objet racine ne référence plus l'objet o1 ( pas exemple via quelque chose comme rootObject.setO1(null) )<br>
+<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg2.png" name="images9"><br>
+Et faire que l'objet racine ne référence plus l'objet o1 ( pas exemple
+via quelque chose comme rootObject.setO1(null) )<br>
<br>
-<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg3.png" name="images10"><br>Puis fermeture de session avec sauvegarde:<br>l'object
-o1 devient un candidat au nettoyage. Le garbage collector aura à
+<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg3.png" name="images10"><br>
+Puis fermeture de session avec sauvegarde:<br>
+l'object
+o1 devient un candidat au nettoyage. Le garbage collector aura
+à
verifier que o1 dans le fichier n'est pas attaché à l'objet racine par
-un chemin de référencement partant l'objet racine.</p><p>
-<img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg4.png" name="images11"></p>
-<hr style="width: 100%; height: 2px;"><div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+un chemin de référencement partant l'objet racine.</p>
+<p><img style="border: 0px solid ; width: 490px; height: 291px;" alt="storage" src="../../images/joafipg4.png" name="images11"></p>
+<hr style="width: 100%; height: 2px;">
+<div style="text-align: center;"><a href="../questionnaire.html">feedback / send your comments</a><br>
+<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../../images/mail.gif" name="images1"><br>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big>
</div>
<hr style="width: 100%; height: 2px;">© 2007-2011, joafip
</body></html>
\ No newline at end of file
Modified: web/fr/index.html
===================================================================
--- web/fr/index.html 2011-11-28 04:14:57 UTC (rev 2984)
+++ web/fr/index.html 2011-11-29 02:00:43 UTC (rev 2985)
@@ -23,7 +23,9 @@
</style>
<style type="text/css">
@import url(http://www.google.fr/cse/api/branding.css);
-</style><meta content="luc peuvrier" name="author"></head>
+</style>
+<meta content="luc peuvrier" name="author">
+</head>
<body style="direction: ltr; color: rgb(0, 0, 0);">
<script type="text/javascript"><!--
google_ad_client = "pub-9679286798235950";
@@ -31,7 +33,9 @@
google_ad_slot = "2109077196";
google_ad_width = 468;
google_ad_height = 60;
-//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br><a href="../index.html">In English</a><br>
+//--></script>
+<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br>
+<a href="../index.html">In English</a><br>
<table style="page-break-before: always;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
@@ -41,30 +45,47 @@
<tbody>
<tr>
<td>
-<p align="center">Solution entre serialisation dans un fichier et base de données</p><p align="center">Bien plus qu'une simple map persistée, n'est pas un simple stockage de type clé/valeur<br>Le graphe formé par les objets en mémoire est sauvegardé en fichier<br>Pemet de gérer des graphes d'objet qui ne tiennent pas en mémoire<br></p>
-<p align="center"><a href="../getting_started_in_joafip_usage.html">Getting started
+<p align="center">Solution entre serialisation
+dans un fichier et base de données</p>
+<p align="center">Bien plus qu'une simple map
+persistée, n'est pas un simple stockage de type clé/valeur<br>
+Le graphe formé par les objets en mémoire est sauvegardé en fichier<br>
+Pemet de gérer des graphes d'objet qui ne tiennent pas en mémoire<br>
+</p>
+<p align="center"><a href="../getting_started_in_joafip_usage.html">Getting
+started
in joafip usage</a></p>
-<p align="left">C'est une sorte de sérailisation intelligente qui: </p>
+<p align="left">C'est une sorte de
+sérailisation intelligente qui: </p>
<ul>
<li>
-<p style="margin-bottom: 0cm;" align="left">met à jour le fichier en fonction des objets qui ont changés, ne réecrit pas tout. </p>
+<p style="margin-bottom: 0cm;" align="left">met
+à jour le fichier en fonction des objets qui ont changés, ne réecrit
+pas tout. </p>
</li>
<li>
-<p align="left">ne recharge pas tout en mémoire, que les objets nécessaires selon les accées. </p>
+<p align="left">ne recharge pas tout en
+mémoire, que les objets nécessaires selon les accées. </p>
</li>
</ul>
<p align="center"><br>
<br>
</p>
<div id="result_box" dir="ltr">
-<p align="center">En production depuis novembre dans une <a href="#ses_esl">application propriétaire</a>
-qui a déclenché le projet joafip.<br>Contactez nous si vous voulez faire référencer votre projet par ce site. </p>
+<p align="center">En production depuis
+novembre dans une <a href="#ses_esl">application
+propriétaire</a>
+qui a déclenché le projet joafip.<br>
+Contactez nous si vous voulez faire référencer votre projet par ce
+site. </p>
</div>
<p style="margin-bottom: 0cm;" align="center"> <br>
-release 3.1.0b1 available</p><p style="margin-bottom: 0cm;" align="center">4.0.0 en développement</p>
-
+release 3.1.0b1 available</p>
+<p style="margin-bottom: 0cm;" align="center">4.0.0
+en développement</p>
<p style="margin-bottom: 0cm;" align="center"><a name="questionnaire"></a><a href="questionnaire.html">feedback questionnaire</a></p>
-<p align="left"><a href="olderweb.html">anciennes pages</a></p>
+<p align="left"><a href="olderweb.html">anciennes
+pages</a></p>
</td>
</tr>
</tbody>
@@ -73,9 +94,11 @@
<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="../images/mail.gif" name="images1"><br>
n'hésitez pas à demander un support<br>
<br>
-<a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
-users mailing list</a><br>
-<a href="http://sourceforge.net/forum/?group_id=203204">forums</a></p>
+<big><big><a href="../../irc.freenode.net.joafip.html">chat
+channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big></p>
</td>
<td>
<p style="margin-left: 0.85cm;"><img style="border: 0px solid ; width: 149px; height: 138px;" alt="joafip logo" src="../images/_joafip_logo.gif" name="images2"><br>
@@ -83,15 +106,13 @@
<a href="http://sourceforge.net/donate/index.php?group_id=203204"><img ...
[truncated message content] |
|
From: <luc...@us...> - 2011-11-29 02:00:50
|
Revision: 2985
http://joafip.svn.sourceforge.net/joafip/?rev=2985&view=rev
Author: luc_peuvrier
Date: 2011-11-29 02:00:43 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
chat link added
Modified Paths:
--------------
web/collections/collection.html
web/conversion/conversion.html
web/data_model_change/data_model_change.html
web/database/dbvsjoafip.html
web/export_import/export_import.html
web/faq/faq.html
web/fr/collections/collection.html
web/fr/database/dbvsjoafip.html
web/fr/howitworks/howitworks.html
web/fr/index.html
web/fr/opposite.html
web/fr/presentation/autosave.html
web/fr/presentation/features.html
web/fr/presentation/ppojo.html
web/howitworks/datarecord.html
web/howitworks/graph_in_key_value_store.html
web/howitworks/howitworks.html
web/impl/heapfile/heapfile.html
web/impl/memoryleak/memoryleak.html
web/impl/proxy/proxy.html
web/impl/treelist/treelist.html
web/irc.freenode.net.joafip.html
web/maven.html
web/olderweb.html
web/opposite.html
web/perf/perf.html
web/presentation/autosave.html
web/presentation/descriptor.html
web/presentation/features.html
web/presentation/javaagent.html
web/presentation/ppojo.html
web/presentation/properties.html
web/presentation/specificfile_io.html
web/presentation/states.html
web/sample/sample.html
web/sources.html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-28 04:15:04
|
Revision: 2984
http://joafip.svn.sourceforge.net/joafip/?rev=2984&view=rev
Author: luc_peuvrier
Date: 2011-11-28 04:14:57 +0000 (Mon, 28 Nov 2011)
Log Message:
-----------
export optimization
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
Added Paths:
-----------
trunk/joafip-4test/src/main/java/net/sf/joafip/export/
trunk/joafip-4test/src/main/java/net/sf/joafip/export/MainCheckExport.java
Modified: trunk/joafip/doc/_todo.txt
===================================================================
--- trunk/joafip/doc/_todo.txt 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/doc/_todo.txt 2011-11-28 04:14:57 UTC (rev 2984)
@@ -21,6 +21,8 @@
- project divided on sub project
- import error reading xml value corrected
- export speed up
+ 1H26 for 6,001,103 (1,000,000 items) disk model Model ST3400620AS SATA 3Gb/s 400GB 7200 RPM
+ (same time for import)
- kept in memory for object referenced by static field
- persisted class byte code checked for persistence constraints
-- check field access constraints, direct field access disallow to force use of getter and/or setter
@@ -80,31 +82,6 @@
currently:
-------------------------------------------------------------------------------------
-export:
-- no more static field management
-- use of a linked list in file instead of heapFileDataManager
-
-xml file for export:
- bad namespace xmlns="http://joafip.sourceforge.net/schema"
- should be xmlns="http://joafip.sourceforge.net"
- may be /joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd to update
-
-auto save problems with jhupedom:
-- HeapFileDataManager problem ?
-
-garbage management error with jhupedom
-
-BlockDataManger
-- test performance with cache, if ok it is a good alternative but:
- - big file, do not reuse free space
- - fixed max data record length
-
-kept in memory problem
-
-joafip reflect project (see setAccessible )
-- joafip
-- joafip-log4j
-
changes for garbage management because of autosave
- tests to add
- test for state machine
@@ -115,6 +92,13 @@
alternative is to create list of record attached to root and then clear detached data records
for detached clearing take care of #0 #1 and used for class name and garbage
+export:
+- no more static field management
+
+joafip reflect project (see setAccessible )
+- joafip
+- joafip-log4j
+
java agent: joafip_intrumentation.properties case of method instrument on/off
add method descriptor
@@ -125,6 +109,12 @@
a java agent to change "new Xxx" to call to newInstance proxied object factory for auto save
collection apache and google
+
+BlockDataManger
+- test performance with cache, if ok it is a good alternative but:
+ - big file, do not reuse free space
+ - fixed max data record length
+
-------------------------------------------------------------------------------------
copier:
- case of enum field
@@ -132,10 +122,7 @@
- the only user of ClassInfo#isProxyable
- use ClassInfo#isStoreNotLazy (also used by AbstractObjectIOManagerIOForObject )
- test keptInMemory to do not copy
--------------------------------------------------------------------------------------
-is NullProxyCallBack needed ?
-
-------------------------------------------------------------------------------------
trace.txt : rename open_file_trace.txt
Modified: trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -283,7 +283,7 @@
if (fieldInfo.isFieldDefined()) {
field = fieldInfo.getField();
} else {
- // FIXMELUC ________why this case field undefined
+ // FIXMELUC ?why this case field undefined
try {
final Class<?> clazz = fieldInfo.getDeclaringClass();
final String fieldName = fieldInfo.getFieldName();
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -33,7 +33,7 @@
public class ObjectAndPersistInfoWeakReference extends WeakReference<Object> {
private final ObjectAndPersistInfo objectAndPersistInfo;
-
+
public ObjectAndPersistInfoWeakReference(final Object referent,
final ObjectAndPersistInfo objectAndPersistInfo,
final ReferenceQueue<? super Object> queue) {
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -544,7 +544,7 @@
synchronized (ObjectStateMap.this) {
final ObjectAndPersistInfo objectAndPersistInfo = ref
.getObjectAndPersistInfo();
- if( objectAndPersistInfo.isWeak()) {
+ if (objectAndPersistInfo.isWeak()) {
assert objectAndPersistInfo.hasNoReferences();
// FIXMELUC __ObjectStateMap stateMap and queue must
// be
@@ -558,7 +558,7 @@
} catch (InterruptedException exception) {
// stop
}
- // FIXMELUC _______thread exception death
+ // FIXMELUC __thread exception death
stopExpungeThread = true;
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -39,63 +39,77 @@
@NotStorableClass
public class ExportStoreQue {
- // FIXMELUC ______why not empty ?
- // HeapFileDataManager not accept empty data
- // net.sf.joafip.heapfile.service.HeapException: associated data size must
- // be defined
- // at
- // net.sf.joafip.heapfile.record.entity.HeapRecord.assertDataRecordStateForMarshalling(HeapRecord.java:385)
- // private static final byte[] DATA = new byte[] {};
- private static final byte[] DATA = new byte[] { 0 };
-
private static final int MAX_RECORDS = 1000;
- private final IHeapDataManager heapDataManagerForQue;
-
private final IHeapDataManager heapDataManagerForSet;
+ private long queFirst;
+
+ private long queLast;
+
+ private final byte[] minusOne;
+
public ExportStoreQue(final String temporaryDirectoryName)
throws HeapException {
super();
- File dataFile = new File(temporaryDirectoryName + "/que");
- HeapFileSetup setup = new HeapFileSetup(dataFile,
+
+ final File dataFile = new File(temporaryDirectoryName + "/set");
+ final HeapFileSetup setup = new HeapFileSetup(dataFile,
false/* crashSafeMode */, true/* useCacheMode */,
false/* deleteRenaming */, false/* clearResizeFile */,
1/* maxFileOperationRetry */, 0/* fileOperationRetryMsDelay */,
null/* openFileTraceFile */);
setup.cacheSetup(1024/* pageSize */, 1024/* maxPage */);
- heapDataManagerForQue = new AutoSaveHeapFileDataManager(setup,
- MAX_RECORDS);
-
- dataFile = new File(temporaryDirectoryName + "/set");
- setup = new HeapFileSetup(dataFile, false/* crashSafeMode */,
- true/* useCacheMode */, false/* deleteRenaming */,
- false/* clearResizeFile */, 1/* maxFileOperationRetry */,
- 0/* fileOperationRetryMsDelay */, null/* openFileTraceFile */);
- setup.cacheSetup(1024/* pageSize */, 1024/* maxPage */);
heapDataManagerForSet = new AutoSaveHeapFileDataManager(setup,
MAX_RECORDS);
+ minusOne = longToBinary(-1);
}
public void initialize() throws HeapException {
- heapDataManagerForQue.startService(true);
heapDataManagerForSet.startService(true);
+ // queue is empty
+ queFirst = -1;
+ queLast = -1;
}
public void close() throws HeapException {
- heapDataManagerForQue.stopService();
heapDataManagerForSet.stopService();
}
public DataRecordIdentifier pollFirst() throws HeapException {
- return heapDataManagerForQue.removeFirstDataRecord();
+ final DataRecordIdentifier first;
+ if (queFirst == -1) {
+ first = null;
+ } else {
+ first = new DataRecordIdentifier(queFirst);
+ final byte[] data = heapDataManagerForSet.readDataRecord(first);
+ queFirst = longFromBinary(data);
+ if (queFirst == -1) {
+ queLast = -1;
+ }
+ }
+ return first;
}
public void addDataRecordIdentifier(
final DataRecordIdentifier dataRecordIdentifier)
throws HeapException {
- if (heapDataManagerForSet.writeDataRecord(dataRecordIdentifier, DATA)) {
- heapDataManagerForQue.writeDataRecord(dataRecordIdentifier, DATA);
+ if (!heapDataManagerForSet.hasDataRecord(dataRecordIdentifier)) {
+ // new last added
+ final long newLast = dataRecordIdentifier.value;
+ if (queLast == -1) {
+ queFirst = newLast;
+ } else {
+ // update previous last
+ final byte[] data = longToBinary(newLast);
+ heapDataManagerForSet.writeDataRecord(new DataRecordIdentifier(
+ queLast), data);
+ }
+ // add new last
+ heapDataManagerForSet.writeDataRecord(dataRecordIdentifier,
+ minusOne);
+ // set last
+ queLast = newLast;
}
}
@@ -103,4 +117,29 @@
return heapDataManagerForSet.getNumberOfDataRecord();
}
+ private long longFromBinary(final byte[] data) {
+ long longValue = 0;
+ longValue |= ((((long) data[0]) & 0xff) << 56);
+ longValue |= ((((long) data[1]) & 0xff) << 48);
+ longValue |= ((((long) data[2]) & 0xff) << 40);
+ longValue |= ((((long) data[3]) & 0xff) << 32);
+ longValue |= ((((long) data[4]) & 0xff) << 24);
+ longValue |= ((((long) data[5]) & 0xff) << 16);
+ longValue |= ((((long) data[6]) & 0xff) << 8);
+ longValue |= (((long) data[7]) & 0xff) & 0xff;
+ return longValue;
+ }
+
+ private byte[] longToBinary(final long longValue) {
+ final byte[] data = new byte[8];
+ data[0] = (byte) (longValue >> 56);
+ data[1] = (byte) (longValue >> 48);
+ data[2] = (byte) (longValue >> 40);
+ data[3] = (byte) (longValue >> 32);
+ data[4] = (byte) (longValue >> 24);
+ data[5] = (byte) (longValue >> 16);
+ data[6] = (byte) (longValue >> 8);
+ data[7] = (byte) longValue;
+ return data;
+ }
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -323,7 +323,6 @@
/*
* inObjectCount==0 because can not unload object when running its code
*/
- // FIXMELUC __________________________unload !exclusiveAccessSession
if (loaded && !loading && inObjectCount == 0) {
// if (loaded) {
// if (!loading && (!exclusiveAccessSession || inObjectCount == 0))
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -32,7 +32,7 @@
builder.setGarbageManagement(false);
builder.setCrashSafeMode(false);
filePersistence = (FilePersistence) builder.build();
- // FIXMELUC ___________NoPersistenceConstraintCheck annotation
+ // FIXMELUC __NoPersistenceConstraintCheck annotation
final Method method = Bob1.class.getDeclaredMethod(
"doSomethingOnOtherBob1Private", new Class<?>[] { Bob1.class });
filePersistence.addToNotCheckMethod(method);
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -82,8 +82,8 @@
if (typeB.getTypeA() != typeA) {
throw new Exception("not same object count=" + count);
}
- typeA=null;//NOPMD
- typeB=null;//NOPMD
+ typeA = null;// NOPMD
+ typeB = null;// NOPMD
}
} catch (Exception e) {
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -27,7 +27,7 @@
/**
*
* @author luc peuvrier
- *
+ *
*/
public class TypeA {
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -27,7 +27,7 @@
/**
*
* @author luc peuvrier
- *
+ *
*/
public class TypeB {
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -70,11 +70,11 @@
public void rotateRight() throws RBTException {
rightRotation(rootNode);
}
-
+
public void rotateLeft() throws RBTException {
leftRotation(rootNode);
}
-
+
private void rightRotation(final IRBTNode<E> node) throws RBTException {
final IRBTNode<E> currentNode = node;
if (currentNode != null && !currentNode.isSentinel()) {
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/export/MainCheckExport.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/export/MainCheckExport.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/export/MainCheckExport.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -0,0 +1,122 @@
+package net.sf.joafip.export;
+
+import java.io.File;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+public final class MainCheckExport implements ContentHandler {
+
+ private final Set<Long> objectSet = new TreeSet<Long>();
+
+ private final Set<Long> refSet = new TreeSet<Long>();
+
+ private MainCheckExport() {
+ super();
+ }
+
+ public static void main(final String[] args) {
+ try {
+ final MainCheckExport main = new MainCheckExport();
+ main.run();
+ } catch (Exception exception) {
+ exception.printStackTrace();// NOPMD
+ }
+ }
+
+ private void run() throws Exception { // NOPMD
+ final SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(false);
+ final SAXParser saxParser = factory.newSAXParser();
+ final XMLReader reader = saxParser.getXMLReader();
+ reader.setContentHandler(this);
+ final File exportFile = new File("../joafip/runtime/export.xml");
+ final String sourcePath = exportFile.toURI().toString();
+ reader.parse(new InputSource(sourcePath));
+
+ for (long refId : refSet) {
+ if (!objectSet.contains(refId)) {
+ System.out.println("missing #" + refId);// NOPMD
+ }
+ }
+ }
+
+ @Override
+ public void setDocumentLocator(final Locator locator) {
+ // no implementation
+ }
+
+ @Override
+ public void startDocument() throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void endDocument() throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void startPrefixMapping(final String prefix, final String uri)
+ throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void endPrefixMapping(final String prefix) throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void startElement(final String uri, final String localName,
+ final String qName, final Attributes atts) throws SAXException {
+ if ("object".equals(qName) || "enum".equals(qName)
+ || "string".equals(qName) || "array".equals(qName)) {
+ final String idStr = atts.getValue("id");
+ objectSet.add(Long.parseLong(idStr));
+ System.out.println(idStr);// NOPMD
+ } else if ("reference".equals(qName)) {
+ final String idStr = atts.getValue("id");
+ refSet.add(Long.parseLong(idStr));
+ }
+ }
+
+ @Override
+ public void endElement(final String uri, final String localName,
+ final String qName) throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void characters(final char[] ch, final int start, final int length)// NOPMD
+ throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void ignorableWhitespace(final char[] ch, final int start,// NOPMD
+ final int length) throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void processingInstruction(final String target, final String data)
+ throws SAXException {
+ // no implementation
+ }
+
+ @Override
+ public void skippedEntity(final String name) throws SAXException {
+ // no implementation
+ }
+}
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -52,6 +52,8 @@
@NotStorableClass
public class HeapFileDataManager extends AbstractHeapDataManager {// NOPMD
+ // FIXMELUC ______HeapFileDataManager not accept empty data
+
/**
*
*/
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java 2011-11-27 06:26:48 UTC (rev 2983)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java 2011-11-28 04:14:57 UTC (rev 2984)
@@ -176,7 +176,7 @@
* @return data record identifier of first data record removed
* @throws HeapException
*/
- // FIXMELUC ________to test or remove or add more
+ // FIXMELUC __to test or remove or add more
DataRecordIdentifier removeFirstDataRecord() throws HeapException;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-28 04:15:04
|
Revision: 2984
http://joafip.svn.sourceforge.net/joafip/?rev=2984&view=rev
Author: luc_peuvrier
Date: 2011-11-28 04:14:57 +0000 (Mon, 28 Nov 2011)
Log Message:
-----------
export optimization
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
trunk/joafip/src/main/java/net/sf/joafip/reflect/HelperReflect.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
Added Paths:
-----------
trunk/joafip-4test/src/main/java/net/sf/joafip/export/
trunk/joafip-4test/src/main/java/net/sf/joafip/export/MainCheckExport.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-27 06:26:54
|
Revision: 2983
http://joafip.svn.sourceforge.net/joafip/?rev=2983&view=rev
Author: luc_peuvrier
Date: 2011-11-27 06:26:48 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
no more used
Removed Paths:
-------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/que/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-27 06:26:54
|
Revision: 2983
http://joafip.svn.sourceforge.net/joafip/?rev=2983&view=rev
Author: luc_peuvrier
Date: 2011-11-27 06:26:48 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
no more used
Removed Paths:
-------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/que/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-27 06:26:34
|
Revision: 2982
http://joafip.svn.sourceforge.net/joafip/?rev=2982&view=rev
Author: luc_peuvrier
Date: 2011-11-27 06:26:28 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
no more used
Removed Paths:
-------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/export_import/out/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-27 06:26:34
|
Revision: 2982
http://joafip.svn.sourceforge.net/joafip/?rev=2982&view=rev
Author: luc_peuvrier
Date: 2011-11-27 06:26:28 +0000 (Sun, 27 Nov 2011)
Log Message:
-----------
no more used
Removed Paths:
-------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/export_import/out/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-25 06:18:45
|
Revision: 2981
http://joafip.svn.sourceforge.net/joafip/?rev=2981&view=rev
Author: luc_peuvrier
Date: 2011-11-25 06:18:38 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
auto save stable
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java
Added Paths:
-----------
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainSimpleTree.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2011-11-24 19:25:19 UTC (rev 2980)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -417,10 +417,8 @@
// cleared
final boolean wasWeaked = weaked;
if (!weaked && isNotAcceded() && object != null) {
- if (weakReference == null) {
- weakReference = new ObjectAndPersistInfoWeakReference(object,
- this, queue);
- }
+ weakReference = new ObjectAndPersistInfoWeakReference(object, this,
+ queue);
clear();// Unreferenced
weaked = true;
}
@@ -468,9 +466,10 @@
if (weaked) {
assert object == null;
final Object object = weakReference.get();
+ weaked = false;
+ weakReference = null;// NOPMD
if (object != null) {
setObject(object);
- weaked = false;
objectStateMap.unWeakReferenceOnObject(this);
}
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java 2011-11-24 19:25:19 UTC (rev 2980)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -33,7 +33,7 @@
public class ObjectAndPersistInfoWeakReference extends WeakReference<Object> {
private final ObjectAndPersistInfo objectAndPersistInfo;
-
+
public ObjectAndPersistInfoWeakReference(final Object referent,
final ObjectAndPersistInfo objectAndPersistInfo,
final ReferenceQueue<? super Object> queue) {
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2011-11-24 19:25:19 UTC (rev 2980)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -32,7 +32,6 @@
import net.sf.joafip.store.entity.classinfo.ClassInfo;
import net.sf.joafip.store.service.classinfo.ClassInfoException;
import net.sf.joafip.store.service.objectio.ObjectIOException;
-import net.sf.joafip.util.DebugUtil;
/**
* Maintains link between object in memory and their persistence information<br>
@@ -89,32 +88,14 @@
*/
public ObjectStateMap() {// NOPMD explicit constructor
super();
- // startThread();
}
- private void startThread() {
- expungeThread = new Thread(this, "objectStateExpunge-Thread");
- expungeThread.setDaemon(true);
- expungeThread.setPriority(Thread.MAX_PRIORITY);
- expungeThread.start();
- }
-
public void close() {
if (exclusiveAccessSession) {
stopThread();
}
}
- private void stopThread() {
- synchronized (this) {
- if (!stopExpungeThread) {
- stopExpungeThread = true;
- notifyAll();
- expungeThread.interrupt();
- }
- }
- }
-
public void setTrackingOfAccessedObjectEnabled(
final boolean trackingOfAccessedObjectEnabled) {
this.trackingOfAccessedObjectEnabled = trackingOfAccessedObjectEnabled;
@@ -533,6 +514,23 @@
}
}
+ private void startThread() {
+ expungeThread = new Thread(this, "objectStateExpunge-Thread");
+ expungeThread.setDaemon(true);
+ expungeThread.setPriority(Thread.MAX_PRIORITY);
+ expungeThread.start();
+ }
+
+ private void stopThread() {
+ synchronized (this) {
+ if (!stopExpungeThread) {
+ stopExpungeThread = true;
+ notifyAll();
+ expungeThread.interrupt();
+ }
+ }
+ }
+
@Override
public void run() {
try {
@@ -546,17 +544,21 @@
synchronized (ObjectStateMap.this) {
final ObjectAndPersistInfo objectAndPersistInfo = ref
.getObjectAndPersistInfo();
- assert objectAndPersistInfo.hasNoReferences();
- // FIXMELUC __ObjectStateMap stateMap and queue must be
- // thread safe
- removeWeaked(objectAndPersistInfo);
- ObjectStateMap.this.notifyAll();
+ if( objectAndPersistInfo.isWeak()) {
+ assert objectAndPersistInfo.hasNoReferences();
+ // FIXMELUC __ObjectStateMap stateMap and queue must
+ // be
+ // thread safe
+ removeWeaked(objectAndPersistInfo);
+ ObjectStateMap.this.notifyAll();
+ }
}
}
}
} catch (InterruptedException exception) {
// stop
}
+ // FIXMELUC _______thread exception death
stopExpungeThread = true;
}
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2011 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.autosave.cycle;
+
+import net.sf.joafip.redblacktree.service.RBTException;
+import net.sf.joafip.service.FilePersistenceBuilder;
+import net.sf.joafip.service.FilePersistenceClassNotFoundException;
+import net.sf.joafip.service.FilePersistenceDataCorruptedException;
+import net.sf.joafip.service.FilePersistenceException;
+import net.sf.joafip.service.FilePersistenceInvalidClassException;
+import net.sf.joafip.service.FilePersistenceNotSerializableException;
+import net.sf.joafip.service.FilePersistenceTooBigForSerializationException;
+import net.sf.joafip.service.IAutoSaveEventListener;
+import net.sf.joafip.service.IExclusiveDataAccessSession;
+import net.sf.joafip.service.IFilePersistence;
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public final class MainCycle implements IAutoSaveEventListener {
+
+ private MainCycle() {
+ super();
+ }
+
+ public static void main(final String[] args) {
+ try {
+ final MainCycle main = new MainCycle();
+ main.run();
+ } catch (Exception exception) {
+ exception.printStackTrace();// NOPMD
+ }
+ }
+
+ private void run() throws FilePersistenceException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceNotSerializableException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceDataCorruptedException,
+ FilePersistenceTooBigForSerializationException, RBTException {
+ final IFilePersistence filePersistence = createFilePersistence();
+ // filePersistence.setAutoSaveEventListener(this);
+ final IExclusiveDataAccessSession session = filePersistence
+ .createExclusiveDataAccessSession();
+ final IInstanceFactory instanceFactory = session.getInstanceFactory();
+
+ session.open();
+
+ try {
+ TypeA typeA = TypeA.newInstance(instanceFactory);
+ TypeB typeB = TypeB.newInstance(instanceFactory);
+ typeA.setTypeB(typeB);
+ typeB.setTypeA(typeA);
+ session.setObject("key", typeA);
+
+ for (int count = 0; count < 1000; count++) {
+ typeA = (TypeA) session.getObject("key");
+ typeB = typeA.getTypeB();
+ if (typeB.getTypeA() != typeA) {
+ throw new Exception("not same object count=" + count);
+ }
+ typeA=null;//NOPMD
+ typeB=null;//NOPMD
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();// NOPMD
+ } finally {
+ session.close();
+ }
+
+ filePersistence.xmlExport("runtime", "runtime/temp", false);
+ filePersistence.close();
+ }
+
+ private IFilePersistence createFilePersistence()
+ throws FilePersistenceException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceNotSerializableException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceDataCorruptedException {
+ final FilePersistenceBuilder builder = new FilePersistenceBuilder();
+ builder.setPathName("runtime");
+ // builder.setFileCache(setup.getPageSize(), setup.getMaxPage());
+ builder.setProxyMode(true);
+ builder.setRemoveFiles(true);
+ builder.setCrashSafeMode(false);
+ builder.setGarbageManagement(false);
+ builder.setAutoSaveEnabled(true);
+ builder.setMaxInMemoryThreshold(0);
+ // builder.setMaintenedInMemory(true);
+ // builder.setMaintenedInMemoryQuota(500);
+ builder.setFileCache(1000, 10 * 1024);
+ return builder.build();
+ }
+
+ @Override
+ public boolean doSave() {
+ return true;
+ }
+
+ @SuppressWarnings("PMD")
+ @Override
+ public void saveDone(final int numberOfObjectState,
+ final int numberOfWeakreference, final long msDuration) {
+ System.out.print("n=");
+ System.out.print(numberOfObjectState);
+ System.out.print(" w=");
+ System.out.print(numberOfWeakreference);
+ System.out.print(" d=");
+ System.out.print(msDuration);
+ System.out.println(" mS");
+ }
+
+}
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2011 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.autosave.cycle;
+
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public class TypeA {
+
+ private TypeB typeB;
+
+ public static TypeA newInstance(final IInstanceFactory instanceFactory) {
+ TypeA newInstance;
+ if (instanceFactory == null) {
+ newInstance = new TypeA();
+ } else {
+ newInstance = (TypeA) instanceFactory.newInstance(TypeA.class);
+ }
+ return newInstance;
+ }
+
+ public TypeB getTypeB() {
+ return typeB;
+ }
+
+ public void setTypeB(final TypeB typeB) {
+ this.typeB = typeB;
+ }
+}
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2011 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.autosave.cycle;
+
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public class TypeB {
+
+ private TypeA typeA;
+
+ public static TypeB newInstance(final IInstanceFactory instanceFactory) {
+ TypeB newInstance;
+ if (instanceFactory == null) {
+ newInstance = new TypeB();
+ } else {
+ newInstance = (TypeB) instanceFactory.newInstance(TypeB.class);
+ }
+ return newInstance;
+ }
+
+ public TypeA getTypeA() {
+ return typeA;
+ }
+
+ public void setTypeA(final TypeA typeA) {
+ this.typeA = typeA;
+ }
+}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java 2011-11-24 19:25:19 UTC (rev 2980)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -83,7 +83,7 @@
}
}
} catch (Exception e) {
- e.printStackTrace();
+ e.printStackTrace();// NOPMD
} finally {
session.close();
}
@@ -106,9 +106,9 @@
builder.setCrashSafeMode(false);
builder.setGarbageManagement(false);
builder.setAutoSaveEnabled(true);
- builder.setMaxInMemoryThreshold(0);
- // builder.setMaintenedInMemory(true);
- // builder.setMaintenedInMemoryQuota(500);
+ builder.setMaxInMemoryThreshold(1000);
+ builder.setMaintenedInMemory(true);
+ builder.setMaintenedInMemoryQuota(500);
builder.setFileCache(1000, 10 * 1024);
return builder.build();
}
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainSimpleTree.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainSimpleTree.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainSimpleTree.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -0,0 +1,301 @@
+/*
+ * Copyright 2011 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.autosave.rbtree;
+
+import net.sf.joafip.redblacktree.entity.IRBTNode;
+import net.sf.joafip.redblacktree.entity.RBTSentinel;
+import net.sf.joafip.redblacktree.impl.memory.entity.RBTNode;
+import net.sf.joafip.redblacktree.service.RBTException;
+import net.sf.joafip.service.FilePersistence;
+import net.sf.joafip.service.FilePersistenceBuilder;
+import net.sf.joafip.service.FilePersistenceClassNotFoundException;
+import net.sf.joafip.service.FilePersistenceDataCorruptedException;
+import net.sf.joafip.service.FilePersistenceException;
+import net.sf.joafip.service.FilePersistenceInvalidClassException;
+import net.sf.joafip.service.FilePersistenceNotSerializableException;
+import net.sf.joafip.service.FilePersistenceTooBigForSerializationException;
+import net.sf.joafip.service.IAutoSaveEventListener;
+import net.sf.joafip.service.IExclusiveDataAccessSession;
+import net.sf.joafip.service.IFilePersistence;
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public final class MainSimpleTree implements IAutoSaveEventListener {
+
+ private FilePersistence filePersistence;
+
+ private MainSimpleTree() {
+ super();
+ }
+
+ public static void main(final String[] args) {
+ try {
+ final MainSimpleTree main = new MainSimpleTree();
+ main.run();
+ } catch (Exception exception) {
+ exception.printStackTrace();// NOPMD
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void run() throws FilePersistenceException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceNotSerializableException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceDataCorruptedException,
+ FilePersistenceTooBigForSerializationException, RBTException {
+ filePersistence = (FilePersistence) createFilePersistence();
+ // filePersistence.setAutoSaveEventListener(this);
+ final IExclusiveDataAccessSession session = filePersistence
+ .createExclusiveDataAccessSession();
+ final IInstanceFactory instanceFactory = session.getInstanceFactory();
+
+ session.open();
+
+ int count = 0;
+ try {
+ final SimpleTreeOp<String> tree = SimpleTreeOp
+ .newInstance(instanceFactory);
+ session.setObject("tree", tree);
+
+ RBTNode<String> nodeQ = RBTNode.newInstance(instanceFactory, "Q");
+ RBTNode<String> nodeP = RBTNode.newInstance(instanceFactory, "P");
+
+ RBTNode<String> nodeC = RBTNode.newInstance(instanceFactory, "C");
+ RBTSentinel<String> nodeCLeft = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeC.setLeft(nodeCLeft);
+ nodeCLeft.setParent(nodeC);
+ nodeCLeft = null;// NOPMD
+ RBTSentinel<String> nodeCRight = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeC.setRight(nodeCRight);
+ nodeCRight.setParent(nodeC);
+ nodeCRight = null;// NOPMD
+
+ RBTNode<String> nodeA = RBTNode.newInstance(instanceFactory, "A");
+ RBTSentinel<String> nodeALeft = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeA.setLeft(nodeALeft);
+ nodeALeft.setParent(nodeA);
+ nodeALeft = null;// NOPMD
+ RBTSentinel<String> nodeARight = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeA.setRight(nodeARight);
+ nodeARight.setParent(nodeA);
+ nodeARight = null;// NOPMD
+
+ RBTNode<String> nodeB = RBTNode.newInstance(instanceFactory, "B");
+ RBTSentinel<String> nodeBLeft = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeB.setLeft(nodeBLeft);
+ nodeBLeft.setParent(nodeB);
+ nodeBLeft = null;// NOPMD
+ RBTSentinel<String> nodeBRight = RBTSentinel
+ .newInstance(instanceFactory);
+ nodeB.setRight(nodeBRight);
+ nodeBRight.setParent(nodeB);
+ nodeBRight = null;// NOPMD
+
+ nodeQ.setRight(nodeC);
+ nodeC.setParent(nodeQ);
+ nodeQ.setLeft(nodeP);
+ nodeP.setParent(nodeQ);
+ nodeP.setRight(nodeB);
+ nodeB.setParent(nodeP);
+ nodeP.setLeft(nodeA);
+ nodeA.setParent(nodeP);
+ tree.setRootNode(nodeQ);
+
+ nodeQ = nodeP = nodeA = nodeB = nodeC = null;// NOPMD
+
+ for (count = 0; count < 1000; count++) {
+ check1(tree);
+ tree.rotateRight();
+ check2(tree);
+ tree.rotateLeft();
+ }
+
+ } catch (Exception e) {
+ System.err.println("count=" + count);// NOPMD
+ e.printStackTrace();// NOPMD
+ } finally {
+ session.close();
+ }
+
+ filePersistence.xmlExport("runtime", "runtime/temp", false);
+ filePersistence.close();
+ }
+
+ private void check1(final SimpleTreeOp<String> tree) throws RBTException {
+ final IRBTNode<String> nodeQ = tree.getRootNode();
+ assertEquals("Q", nodeQ.getElement());
+ assertSame(null, nodeQ.getParent());
+
+ final IRBTNode<String> nodeC = nodeQ.getRight();
+ assertEquals("C", nodeC.getElement());
+ IRBTNode<String> node = nodeC.getRight();
+ assertSame(nodeC, node.getParent());
+ node = nodeC.getLeft();
+ assertSame(nodeC, node.getParent());
+
+ final IRBTNode<String> nodeP = nodeQ.getLeft();
+ assertEquals("P", nodeP.getElement());
+ assertSame(nodeQ, nodeP.getParent());
+
+ final IRBTNode<String> nodeB = nodeP.getRight();
+ assertEquals("B", nodeB.getElement());
+ assertSame(nodeP, nodeB.getParent());
+ node = nodeB.getRight();
+ assertSame(nodeB, node.getParent());
+ node = nodeB.getLeft();
+ assertSame(nodeB, node.getParent());
+
+ final IRBTNode<String> nodeA = nodeP.getLeft();
+ assertEquals("A", nodeA.getElement());
+ assertSame(nodeP, nodeA.getParent());
+ node = nodeA.getRight();
+ assertSame(nodeA, node.getParent());
+ node = nodeA.getLeft();
+ assertSame(nodeA, node.getParent());
+ }
+
+ private void check2(final SimpleTreeOp<String> tree) throws RBTException {
+ final IRBTNode<String> nodeP = tree.getRootNode();
+ assertEquals("P", nodeP.getElement());
+ assertSame(null, nodeP.getParent());
+
+ final IRBTNode<String> nodeA = nodeP.getLeft();
+ assertEquals("A", nodeA.getElement());
+ assertSame(nodeP, nodeA.getParent());
+ IRBTNode<String> node = nodeA.getRight();
+ assertSame(nodeA, node.getParent());
+ node = nodeA.getLeft();
+ assertSame(nodeA, node.getParent());
+
+ final IRBTNode<String> nodeQ = nodeP.getRight();
+ assertEquals("Q", nodeQ.getElement());
+ assertSame(nodeP, nodeQ.getParent());
+
+ final IRBTNode<String> nodeC = nodeQ.getRight();
+ assertEquals("C", nodeC.getElement());
+ assertSame(nodeQ, nodeC.getParent());
+ node = nodeC.getRight();
+ assertSame(nodeC, node.getParent());
+ node = nodeC.getLeft();
+ assertSame(nodeC, node.getParent());
+
+ final IRBTNode<String> nodeB = nodeQ.getLeft();
+ assertEquals("B", nodeB.getElement());
+ assertSame(nodeQ, nodeB.getParent());
+ node = nodeB.getRight();
+ assertSame(nodeB, node.getParent());
+ node = nodeB.getLeft();
+ assertSame(nodeB, node.getParent());
+ }
+
+ private void assertSame(final IRBTNode<String> node1,
+ final IRBTNode<String> node2) throws RBTException {
+ if (node1 != node2) {// NOPMD
+ throw new RBTException("not same node: " + nodeElement(node2)
+ + " for " + nodeElement(node1) + " expected\n"
+ + sysId(node2) + " " + sysId(node1) + "\n"
+ + dataRecordId(node2) + " " + dataRecordId(node1));
+ }
+ }
+
+ private String sysId(final Object object) {
+ return object.getClass() + "#" + System.identityHashCode(object);
+ }
+
+ private String dataRecordId(final Object object) {
+ try {
+ return ""// NOPMD
+ + filePersistence
+ .getCurrentDataRecordIdentifierAssociatedToObject(object).value;
+ } catch (Exception e) {
+ return e.getMessage();
+ }
+ }
+
+ private String nodeElement(final IRBTNode<String> node) {
+ String result;
+ try {
+ result = node.getElement();
+ } catch (RBTException e) {
+ result = "no element";
+ }
+ return result;
+ }
+
+ private void assertEquals(final String val1, final String val2)
+ throws RBTException {
+ if (!val1.equals(val2)) {
+ throw new RBTException(val2 + " for " + val1 + " expected");
+ }
+ }
+
+ private IFilePersistence createFilePersistence()
+ throws FilePersistenceException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceNotSerializableException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceDataCorruptedException {
+ final FilePersistenceBuilder builder = new FilePersistenceBuilder();
+ builder.setPathName("runtime");
+ // builder.setFileCache(setup.getPageSize(), setup.getMaxPage());
+ builder.setProxyMode(true);
+ builder.setRemoveFiles(true);
+ builder.setCrashSafeMode(false);
+ builder.setGarbageManagement(false);
+ builder.setAutoSaveEnabled(true);
+ builder.setMaxInMemoryThreshold(0);
+ // builder.setMaintenedInMemory(true);
+ // builder.setMaintenedInMemoryQuota(500);
+ builder.setFileCache(1000, 10 * 1024);
+ return builder.build();
+ }
+
+ @Override
+ public boolean doSave() {
+ return true;
+ }
+
+ @SuppressWarnings("PMD")
+ @Override
+ public void saveDone(final int numberOfObjectState,
+ final int numberOfWeakreference, final long msDuration) {
+ System.out.print("n=");
+ System.out.print(numberOfObjectState);
+ System.out.print(" w=");
+ System.out.print(numberOfWeakreference);
+ System.out.print(" d=");
+ System.out.print(msDuration);
+ System.out.println(" mS");
+ }
+
+}
Added: trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java (rev 0)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java 2011-11-25 06:18:38 UTC (rev 2981)
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2011 Luc Peuvrier
+ *
+ * This file is a part of JOAFIP.
+ *
+ * JOAFIP is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License.
+ *
+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
+ * Licensed under the LGPL License, Version 3, 29 June 2007 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * JOAFIP is distributed in the hope that it will be useful, but
+ * unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.joafip.autosave.rbtree;
+
+import net.sf.joafip.redblacktree.entity.IRBTNode;
+import net.sf.joafip.redblacktree.entity.RBTSentinel;
+import net.sf.joafip.redblacktree.service.RBTException;
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ * @param E
+ */
+public class SimpleTreeOp<E> {
+
+ private IRBTNode<E> rootNode;
+
+ private final IInstanceFactory instanceFactory;
+
+ public SimpleTreeOp(final IInstanceFactory instanceFactory) {
+ super();
+ this.instanceFactory = instanceFactory;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public static SimpleTreeOp newInstance(
+ final IInstanceFactory instanceFactory) {
+ final SimpleTreeOp newInstance;
+ if (instanceFactory == null) {
+ newInstance = new SimpleTreeOp(instanceFactory);
+ } else {
+ newInstance = (SimpleTreeOp) instanceFactory.newInstance(
+ SimpleTreeOp.class,
+ new Class<?>[] { IInstanceFactory.class },
+ new Object[] { instanceFactory });
+ }
+ return newInstance;
+ }
+
+ public IRBTNode<E> getRootNode() {
+ return rootNode;
+ }
+
+ public void setRootNode(final IRBTNode<E> rootNode) {
+ this.rootNode = rootNode;
+ }
+
+ public void rotateRight() throws RBTException {
+ rightRotation(rootNode);
+ }
+
+ public void rotateLeft() throws RBTException {
+ leftRotation(rootNode);
+ }
+
+ private void rightRotation(final IRBTNode<E> node) throws RBTException {
+ final IRBTNode<E> currentNode = node;
+ if (currentNode != null && !currentNode.isSentinel()) {
+ final IRBTNode<E> left = leftOf(currentNode);
+ setLeft(currentNode, rightOf(left));
+ if (rightOf(left) != null) {
+ rightOf(left).setParent(currentNode);
+ }
+ final IRBTNode<E> lParent = parentOf(currentNode);
+ left.setParent(lParent);
+ if (lParent == null) {
+ rootNode = left;
+ } else if (rightOf(lParent) == currentNode) {
+ setRight(lParent, left);
+ } else {
+ setLeft(lParent, left);
+ }
+ setRight(left, currentNode);
+ currentNode.setParent(left);
+ }
+ }
+
+ private void leftRotation(final IRBTNode<E> node) throws RBTException {
+ final IRBTNode<E> currentNode = node;
+ if (currentNode != null && !currentNode.isSentinel()) {// NOPMD
+ final IRBTNode<E> right = rightOf(currentNode);
+ setRight(currentNode, leftOf(right));
+ if (leftOf(right) != null) {
+ leftOf(right).setParent(currentNode);
+ }
+ final IRBTNode<E> pParent = parentOf(currentNode);
+ right.setParent(pParent);
+ if (pParent == null) {
+ rootNode = right;
+ } else if (leftOf(pParent) == currentNode) {
+ setLeft(pParent, right);
+ } else {
+ setRight(pParent, right);
+ }
+ setLeft(right, currentNode);
+ currentNode.setParent(right);
+ }
+ }
+
+ private IRBTNode<E> parentOf(final IRBTNode<E> node) throws RBTException {
+ return (node == null ? null : node.getParent());
+ }
+
+ private IRBTNode<E> leftOf(final IRBTNode<E> node) throws RBTException {
+ return (node == null || node.isSentinel()) ? null : node.getLeft();// NOPMD
+ }
+
+ private IRBTNode<E> rightOf(final IRBTNode<E> node) throws RBTException {
+ return (node == null || node.isSentinel()) ? null : node.getRight();// NOPMD
+ }
+
+ @SuppressWarnings("unchecked")
+ private void setLeft(final IRBTNode<E> node, final IRBTNode<E> leftNode)
+ throws RBTException {
+ if (node != null && !node.isSentinel()) {
+ if (leftNode == null) {
+ final IRBTNode<E> sentinel = RBTSentinel
+ .newInstance(instanceFactory);
+ node.setLeft(sentinel);
+ sentinel.setParent(node);
+ } else {
+ node.setLeft(leftNode);
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void setRight(final IRBTNode<E> node, final IRBTNode<E> leftNode)
+ throws RBTException {
+ if (node != null && !node.isSentinel()) {
+ if (leftNode == null) {
+ final IRBTNode<E> sentinel = RBTSentinel
+ .newInstance(instanceFactory);
+ node.setRight(sentinel);
+ sentinel.setParent(node);
+ } else {
+ node.setRight(leftNode);
+ }
+ }
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-25 06:18:45
|
Revision: 2981
http://joafip.svn.sourceforge.net/joafip/?rev=2981&view=rev
Author: luc_peuvrier
Date: 2011-11-25 06:18:38 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
auto save stable
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfoWeakReference.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java
Added Paths:
-----------
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/MainCycle.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeA.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/cycle/TypeB.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainSimpleTree.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/SimpleTreeOp.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-24 19:25:26
|
Revision: 2980
http://joafip.svn.sourceforge.net/joafip/?rev=2980&view=rev
Author: luc_peuvrier
Date: 2011-11-24 19:25:19 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
chat link added
Modified Paths:
--------------
web/index.html
web/schema/joafip.xsd
Added Paths:
-----------
web/irc.freenode.net.joafip.html
Modified: web/index.html
===================================================================
--- web/index.html 2011-11-23 02:54:42 UTC (rev 2979)
+++ web/index.html 2011-11-24 19:25:19 UTC (rev 2980)
@@ -78,10 +78,10 @@
<p><br>
<img style="border: 0px solid ; width: 277px; height: 27px;" alt="mail to luc peuvrier" src="images/mail.gif" name="images1"><br>
do not hesitate to seek support<br>
-<br>
-<a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
-users mailing list</a><br>
-<a href="http://sourceforge.net/forum/?group_id=203204">forums</a></p>
+<big><big><a href="irc.freenode.net.joafip.html">chat channel</a></big></big><br>
+<big><big><a href="http://lists.sourceforge.net/mailman/listinfo/joafip-users">joafip
+users mailing list</a></big></big><br>
+<big><big><a href="http://sourceforge.net/forum/?group_id=203204">forums</a></big></big></p>
</td>
<td>
<p style="margin-left: 0.85cm;"><img style="border: 0px solid ; width: 149px; height: 138px;" alt="joafip logo" src="images/_joafip_logo.gif" name="images2"><br>
@@ -319,7 +319,7 @@
<p style="margin-bottom: 0cm;"><a name="ses_esl"></a>used
in <a href="http://www.ses-esl.com/">Store Electronic Systems</a> application that had trigger the project
joafip, since November 2008<br><br>
-<font color="#000000"><a href="http://www.ses-esl.com/"><font color="#000080"><a href="http://www.store-electronic-systems.com/"><img style="border: 2px solid ; width: 393px; height: 39px;" alt="store electronic systems" src="images/big_ses_esl.png" name="images6"></a></font></a></font></p></li><br>
+<font color="#000000"><a href="http://www.ses-esl.com/"><font color="#000080"></font></a><font color="#000080"><a href="http://www.store-electronic-systems.com/"><img style="border: 2px solid ; width: 393px; height: 39px;" alt="store electronic systems" src="images/big_ses_esl.png" name="images6"></a></font></font></p></li><br>
<li><a name="CNRS"></a>used by <a href="http://npa.snv.jussieu.fr/eq/equipe.php?eq=enmvi&lang=en">UMR
7102 equipe ENMVI</a> of <a href="http://www.cnrs.fr/">CNRS</a>
in application making calculation of behavioral parameters on data
Added: web/irc.freenode.net.joafip.html
===================================================================
--- web/irc.freenode.net.joafip.html (rev 0)
+++ web/irc.freenode.net.joafip.html 2011-11-24 19:25:19 UTC (rev 2980)
@@ -0,0 +1,5 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+</head><body><br><big>You can chat at <span style="font-weight: bold;">irc.freenode.net</span> in <span style="font-weight: bold;">#joafip</span> channel<br>My nickname is lcpvrr<br></big><br>
+<iframe src="http://webchat.freenode.net?channels=joafip&uio=d4" height="400" width="800"></iframe>
+</body></html>
\ No newline at end of file
Modified: web/schema/joafip.xsd
===================================================================
--- web/schema/joafip.xsd 2011-11-23 02:54:42 UTC (rev 2979)
+++ web/schema/joafip.xsd 2011-11-24 19:25:19 UTC (rev 2980)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://joafip.sourceforge.net/schema" xmlns="http://joafip.sourceforge.net/schema"
+ targetNamespace="http://joafip.sourceforge.net" xmlns="http://joafip.sourceforge.net"
elementFormDefault="qualified">
<xs:annotation>
@@ -55,7 +55,7 @@
<!-- field -->
<xs:element name="field" minOccurs="0" maxOccurs="unbounded">
<xs:complexType mixed="false">
- <xs:group ref="fieldElt" />
+ <xs:group ref="fieldElt" minOccurs="1" maxOccurs="1" />
<xs:attribute name="class" type="xs:string" use="required" />
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="declClass" type="xs:string"
@@ -85,7 +85,7 @@
<!-- field -->
<xs:element name="field" minOccurs="0" maxOccurs="unbounded">
<xs:complexType mixed="false">
- <xs:group ref="fieldElt" />
+ <xs:group ref="fieldElt" minOccurs="1" maxOccurs="1" />
<xs:attribute name="class" type="xs:string" use="required" />
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="declClass" type="xs:string"
@@ -114,13 +114,13 @@
<xs:choice>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:choice>
- <xs:group ref="reference" />
- <xs:group ref="object" />
+ <xs:group ref="reference" minOccurs="1" maxOccurs="1" />
+ <xs:group ref="object" minOccurs="1" maxOccurs="1" />
</xs:choice>
</xs:sequence>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:group ref="value" />
+ <xs:group ref="value" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:choice>
@@ -225,7 +225,7 @@
</xs:sequence>
- <!-- static field -->
+ <!-- static field -->
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="staticField" minOccurs="1"
maxOccurs="1">
@@ -262,13 +262,10 @@
</xs:complexType>
- <!--
- <xs:key name="object_id"> <xs:selector xpath=" ./ object | ./ string
- | ./ enum | ./ array" /> <xs:field xpath="@id"/> </xs:key> <xs:keyref
- name="ref_object_id" refer="object_id"> <xs:selector
- xpath="./object/field/reference" /> <xs:field xpath="@id"/>
- </xs:keyref>
- -->
+ <!-- <xs:key name="object_id"> <xs:selector xpath=" ./ object | ./ string
+ | ./ enum | ./ array" /> <xs:field xpath="@id"/> </xs:key> <xs:keyref name="ref_object_id"
+ refer="object_id"> <xs:selector xpath="./object/field/reference" /> <xs:field
+ xpath="@id"/> </xs:keyref> -->
<!-- objects -->
</xs:element>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-24 19:25:25
|
Revision: 2980
http://joafip.svn.sourceforge.net/joafip/?rev=2980&view=rev
Author: luc_peuvrier
Date: 2011-11-24 19:25:19 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
chat link added
Modified Paths:
--------------
web/index.html
web/schema/joafip.xsd
Added Paths:
-----------
web/irc.freenode.net.joafip.html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|