Thread: [Joafip-svn] SF.net SVN: joafip:[2970] trunk (Page 2)
Brought to you by:
luc_peuvrier
|
From: <luc...@us...> - 2011-11-18 02:52:34
|
Revision: 2970
http://joafip.svn.sourceforge.net/joafip/?rev=2970&view=rev
Author: luc_peuvrier
Date: 2011-11-18 02:52:27 +0000 (Fri, 18 Nov 2011)
Log Message:
-----------
error in xml value import reading corrected
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
trunk/joafip/doc/missing.txt
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InValueHandler.java
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/Item.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestEnumMap.java
trunk/joafip-4test/src/main/java/net/sf/joafip/asm/MainAsmForNewProxyCallBack.java
trunk/joafip-4test/src/main/java/net/sf/joafip/asm/NewProxyCallBack.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/TreeMem.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java
Added Paths:
-----------
trunk/joafip/src/test/java/net/sf/joafip/util/TestXmlWriter.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/util/
trunk/joafip-testsuite/src/main/java/net/sf/joafip/util/UtilTests.java
Removed Paths:
-------------
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/MainExportScanner.java
Modified: trunk/joafip/doc/_todo.txt
===================================================================
--- trunk/joafip/doc/_todo.txt 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip/doc/_todo.txt 2011-11-18 02:52:27 UTC (rev 2970)
@@ -19,6 +19,7 @@
- asm 3.3 embedded
- java agent changed
- project divided on sub project
+- import error reading xml value corrected
- export speed up
- kept in memory for object referenced by static field
- persisted class byte code checked for persistence constraints
@@ -79,25 +80,25 @@
currently:
-------------------------------------------------------------------------------------
-auto save problems with jhupedom:
-- HeapFileDataManager problem ?
-
-export/import problem.
-- test with BlockDataManger
+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
-garbage management error with jhupedom
-
kept in memory problem
joafip reflect project (see setAccessible )
Modified: trunk/joafip/doc/missing.txt
===================================================================
--- trunk/joafip/doc/missing.txt 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip/doc/missing.txt 2011-11-18 02:52:27 UTC (rev 2970)
@@ -3,4 +3,64 @@
missing list=[108738, 118200, 132948, 142808, 165872]
using HeapFileDataManager:
-missing list=[108738, 118200, 132948, 142808, 165872]
\ No newline at end of file
+missing list=[108738, 118200, 132948, 142808, 165872]
+
+from xml analyse: check of item identifier
+missing 197290 197290
+missing 197806 197806
+missing 230918 230918
+missing 244118 244118
+missing 250610 250610
+missing 252190 252190
+missing 285034 285034
+missing 298138 298138
+missing 303602 303602
+missing 307170 307170
+missing 315234 315234
+missing 331234 331234
+missing 357662 357662
+missing 361086 361086
+missing 373054 373054
+missing 386462 386462
+missing 412458 412458
+missing 412794 412794
+missing 443458 443458
+missing 476050 476050
+missing 520578 520578
+missing 522050 522050
+missing 524382 524382
+
+
+from import searcher:
+ missing list=
+108738
+118200
+132948
+142808
+165872
+
+mismatch list=
+
+90 for 197290
+6 for 197806
+8 for 230918
+8 for 244118
+10 for 250610
+90 for 252190
+4 for 285034
+38 for 298138
+2 for 303602
+0 for 307170
+34 for 315234
+4 for 331234
+2 for 357662
+86 for 361086
+54 for 373054
+62 for 386462
+8 for 412458
+4 for 412794
+8 for 443458
+0 for 476050
+78 for 520578
+0 for 522050
+82 for 524382
\ No newline at end of file
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InValueHandler.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InValueHandler.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InValueHandler.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -28,7 +28,7 @@
@NotStorableClass
public class InValueHandler extends InSimpleHandler {
- private Object data;
+ private final StringBuilder dataBuilder = new StringBuilder();
public InValueHandler(final XmlImporter xmlImporter) {
super(xmlImporter);
@@ -37,11 +37,11 @@
@Override
public void characters(final char[] chars, final int start, final int length)// NOPMD
throws SAXException {
- data = new String(chars, start, length);
+ dataBuilder.append(chars, start, length);
}
@Override
public Object getData() {
- return data;
+ return dataBuilder.toString();
}
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/Item.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/Item.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/Item.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -42,8 +42,7 @@
this.identifier = identifier;
}
- public Item(final int identifier,
- final String value) {
+ public Item(final int identifier, final String value) {
super();
this.identifier = identifier;
this.value = value;
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestEnumMap.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestEnumMap.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestEnumMap.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -65,17 +65,17 @@
IFilePersistence filePersistence = createFilePersistence(true);
IDataAccessSession session = filePersistence.createDataAccessSession();
session.open();
- Item item=new Item(0, "value");
- session.setObject("key",item);
+ Item item = new Item(0, "value");
+ session.setObject("key", item);
session.closeAndWait(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
filePersistence = createFilePersistence(false);
session = filePersistence.createDataAccessSession();
session.open();
- item=(Item) session.getObject("key");
- assertEquals("bad state",0,item.getIdentifier());
- assertEquals("bad state","value",item.getValue());
+ item = (Item) session.getObject("key");
+ assertEquals("bad state", 0, item.getIdentifier());
+ assertEquals("bad state", "value", item.getValue());
session.closeAndWait(EnumFilePersistenceCloseAction.SAVE);
filePersistence.close();
}
Added: trunk/joafip/src/test/java/net/sf/joafip/util/TestXmlWriter.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/util/TestXmlWriter.java (rev 0)
+++ trunk/joafip/src/test/java/net/sf/joafip/util/TestXmlWriter.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -0,0 +1,81 @@
+/*
+ * 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.util;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+
+import net.sf.joafip.AbstractJoafipTestCase;
+import net.sf.joafip.NoStorableAccess;
+import net.sf.joafip.NotStorableClass;
+import net.sf.joafip.TestConstant;
+import net.sf.joafip.TestException;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+@NoStorableAccess
+public class TestXmlWriter extends AbstractJoafipTestCase {
+
+ public TestXmlWriter() throws TestException {
+ super();
+ }
+
+ public TestXmlWriter(final String name) throws TestException {
+ super(name);
+ }
+
+ public void test() throws XmlWriterException, IOException, TestException {
+ final String file = TestConstant.getWinRamDiskRuntimeDir()
+ + "/xmlWriterTestFile.txt";
+ final OutputStream outputStream = new FileOutputStream(file);
+ final XmlWriter xmlWriter = new XmlWriter(outputStream);
+ for (int index = 0; index <= 1000000; index++) {
+ xmlWriter
+ .writeText(0, Integer.toString(index), true/* writeNewLine */);
+ }
+ xmlWriter.close();
+
+ final BufferedReader reader = new BufferedReader(new InputStreamReader(
+ new FileInputStream(file), "UTF-8"));
+ int index = 0;
+ String line;
+ // skip xml declaration
+ assertNotNull("must has line", reader.readLine());
+ // then check lines
+ while ((line = reader.readLine()) != null) {// NOPMD
+ final int value = Integer.parseInt(line);
+ assertEquals("bad value", index, value);
+ index++;
+ }
+ assertEquals("missing value", 1000001, index);
+ reader.close();
+ }
+}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/asm/MainAsmForNewProxyCallBack.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/asm/MainAsmForNewProxyCallBack.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/asm/MainAsmForNewProxyCallBack.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -6,8 +6,9 @@
public static void main(final String[] args) {
try {
- ASMifierClassVisitor.outAsm(false, NewProxyCallBack.class.getName(),
- "src/main/java/asm/net/sf/joafip/asm/NewProxyCallBackDump.java");
+ ASMifierClassVisitor
+ .outAsm(false, NewProxyCallBack.class.getName(),
+ "src/main/java/asm/net/sf/joafip/asm/NewProxyCallBackDump.java");
} catch (Exception e) {
e.printStackTrace();// NOPMD
}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/asm/NewProxyCallBack.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/asm/NewProxyCallBack.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/asm/NewProxyCallBack.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -8,10 +8,9 @@
private final IProxyCallBackProxyDelegation proxyCallBack;
- public NewProxyCallBack()
- throws ProxyException {
+ public NewProxyCallBack() throws ProxyException {
super();
- proxyCallBack=new ProxyCallBack();
+ proxyCallBack = new ProxyCallBack();
}
public IProxyCallBackProxyDelegation getProxyCallBack() {
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -45,7 +45,8 @@
FilePersistenceTooBigForSerializationException, RBTException,
HeapException {
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
- final IHeapDataManager dataManager = new BlockDataManager(10 * 1024, 10 * 1024,1024);
+ final IHeapDataManager dataManager = new BlockDataManager(10 * 1024,
+ 10 * 1024, 1024);
builder.setDataManager(dataManager);
builder.setProxyMode(true);
builder.setRemoveFiles(true);
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -51,18 +51,21 @@
FilePersistenceTooBigForSerializationException, RBTException,
HeapException, TestException {
final FilePersistenceBuilder builder = new FilePersistenceBuilder();
- final String dir = "runtime";//TestConstant.getWinRamDiskRuntimeDir();
- final IHeapDataManager blockDataManager = new BlockDataManager(dir+"/data",1024);
-// 10 * 1024, 10 * 1024);
- final HeapFileSetup setup = new HeapFileSetup(new File(dir+"/store.data"), false/*crashSafeMode*/,
- false/*useCacheMode*/,false/*deleteRenaming*/, false/*clearResizeFile*/,
- 0/*maxFileOperationRetry*/,0/*fileOperationRetryMsDelay*/,
- new File("runtime/openFileTraceFile.txt"));
+ final String dir = "runtime";// TestConstant.getWinRamDiskRuntimeDir();
+ final IHeapDataManager blockDataManager = new BlockDataManager(dir
+ + "/data", 1024);
+ // 10 * 1024, 10 * 1024);
+ final HeapFileSetup setup = new HeapFileSetup(new File(dir
+ + "/store.data"), false/* crashSafeMode */,
+ false/* useCacheMode */, false/* deleteRenaming */,
+ false/* clearResizeFile */, 0/* maxFileOperationRetry */,
+ 0/* fileOperationRetryMsDelay */, new File(
+ "runtime/openFileTraceFile.txt"));
final IHeapDataManager fileDataManager = new HeapFileDataManager(setup);
builder.setDataManager(new DualWrapDataManager(fileDataManager,
blockDataManager));
-
+
builder.setProxyMode(true);
builder.setRemoveFiles(true);
builder.setCrashSafeMode(false);
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -77,7 +77,7 @@
@Override
public void saveDone(final int numberOfObjectState,
final int numberOfWeakreference, final long msDuration) {
- System.out.println("n=" + numberOfObjectState + " w="//NOPMD
+ System.out.println("n=" + numberOfObjectState + " w="// NOPMD
+ numberOfWeakreference + " t=" + msDuration + " mS");
}
}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/TreeMem.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/TreeMem.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/TreeMem.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -9,7 +9,7 @@
import net.sf.joafip.redblacktree.service.RedBlackTree;
@StorableClass
-public class TreeMem<E> extends Tree<E>{
+public class TreeMem<E> extends Tree<E> {
@AssertNotNull
protected final RedBlackTree<E> redBlackTree;
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -32,6 +32,7 @@
import net.sf.joafip.entity.EnumFilePersistenceCloseAction;
import net.sf.joafip.heapfile.service.IHeapDataManager;
import net.sf.joafip.logger.JoafipLogger;
+import net.sf.joafip.performance.items.entity.Item;
import net.sf.joafip.performance.items.entity.ItemList;
import net.sf.joafip.service.FilePersistenceClassNotFoundException;
import net.sf.joafip.service.FilePersistenceDataCorruptedException;
@@ -86,18 +87,29 @@
initializeByItemDuration();
int missingCount = 0;
final List<Integer> missingList = new LinkedList<Integer>();
+ int misMatchCount = 0;
+ final List<String> misMatchList = new LinkedList<String>();
for (int identifier = 0; identifier < NUMBER_OF_ITEM; identifier++) {
final ItemList itemList = getItemList(session);
final long startSearchTime = System.currentTimeMillis();
- if (itemList.get(identifier) == null) {
+ final Item item = itemList.get(identifier);
+ if (item == null) {
// throw new
// IllegalStateException("missing item for identifier "
// + identifier);
logger.info("missing item for identifier " + identifier);
missingCount++;
- if (missingCount < 20) {
+ if (missingCount < 40) {
missingList.add(identifier);
}
+ } else {
+ if (item.getIdentifier() != identifier) {
+ misMatchCount++;
+ if (misMatchCount < 40) {
+ misMatchList.add(item.getIdentifier() + " for "
+ + identifier);
+ }
+ }
}
final long currentTime = System.currentTimeMillis();
final long searchDuration = currentTime - startSearchTime;
@@ -123,8 +135,27 @@
logger.info("max search time " + maxSearchTime);
logger.info((endTime - startTime) + " mS for " + NUMBER_OF_ITEM
+ " items");
+
logger.info("missing count=" + missingCount);
- logger.info("missing list=" + missingList.toString());
+ StringBuilder stringBuilder = new StringBuilder();
+
+ stringBuilder.append("missing list=\n");
+ for (int missing : missingList) {
+ stringBuilder.append(missing);
+ stringBuilder.append('\n');
+ }
+ logger.info(stringBuilder.toString());
+
+ logger.info("mismatch count=" + misMatchCount);
+
+ stringBuilder = new StringBuilder();
+ stringBuilder.append("mismatch list=\n");
+ for (String mismatch : misMatchList) {
+ stringBuilder.append(mismatch);
+ stringBuilder.append('\n');
+ }
+ logger.info(stringBuilder.toString());
+
final ObjectOutputStream objectOutputStream = new ObjectOutputStream(
new FileOutputStream(DURATION_BIN));
objectOutputStream.writeObject(byItemDuration);
Deleted: trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/MainExportScanner.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/MainExportScanner.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/MainExportScanner.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -1,240 +0,0 @@
-/*
- * 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.performance.items.service;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Deque;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import net.sf.joafip.NotStorableClass;
-import net.sf.joafip.logger.JoafipLogger;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-
-/**
- *
- * @author luc peuvrier
- *
- */
-@NotStorableClass
-public final class MainExportScanner implements ErrorHandler, ContentHandler {
-
- private static final JoafipLogger LOGGER = JoafipLogger
- .getLogger(MainExportScanner.class);
-
- private final Deque<String> que = new LinkedList<String>();
-
- private final Deque<String> attrQue = new LinkedList<String>();
-
- private final Set<Integer> valueSet = new TreeSet<Integer>();
-
- private int total;
-
- private int count;
-
- private PrintWriter printWriter;
-
- private MainExportScanner() {
- super();
- }
-
- public static void main(final String[] args) {
- try {
- final MainExportScanner main = new MainExportScanner();
- main.run();
- } catch (Exception exception) {
- LOGGER.error("execution failure", exception);
- }
- }
-
- private void run() throws ParserConfigurationException, SAXException,
- IOException {
- printWriter = new PrintWriter(new File(
- "runtime_perf/export/missing.txt"));
- total = 0;
- count = 0;
- valueSet.add(108738);
- valueSet.add(118200);
- valueSet.add(132948);
- valueSet.add(142808);
- valueSet.add(165872);
-
- final SAXParserFactory factory = SAXParserFactory.newInstance();
- factory.setValidating(false);
- factory.setNamespaceAware(true);
- final SAXParser parser = factory.newSAXParser();
- final XMLReader reader = parser.getXMLReader();
- reader.setErrorHandler(this);
- reader.setContentHandler(this);
- reader.parse(new InputSource("runtime_perf/export/export.xml"));
- System.out.println("count=" + count + " total=" + total);// NOPMD
- printWriter.close();
- }
-
- @Override
- public void warning(final SAXParseException exception) throws SAXException {
- LOGGER.warn("sax error", exception);
- }
-
- @Override
- public void error(final SAXParseException exception) throws SAXException {
- LOGGER.warn("sax error", exception);
- }
-
- @Override
- public void fatalError(final SAXParseException exception)
- throws SAXException {
- LOGGER.warn("sax error", exception);
- }
-
- @Override
- public void startDocument() throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endDocument() throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void setDocumentLocator(final Locator locator) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startPrefixMapping(final String prefix, final String uri)
- throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endPrefixMapping(final String prefix) throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startElement(final String uri, final String localName,
- final String qName, final Attributes atts) throws SAXException {
- final StringBuilder stringBuilder = new StringBuilder();
- final String peekLast = que.peekLast();
- if (peekLast != null) {
- stringBuilder.append(peekLast);
- }
- stringBuilder.append('/');
- stringBuilder.append(localName);
- if ("field".equals(localName)) {
- stringBuilder.append('{');
- stringBuilder.append(atts.getValue("name"));
- stringBuilder.append(',');
- stringBuilder.append(atts.getValue("declClass"));
- stringBuilder.append('}');
- }
- que.addLast(stringBuilder.toString());
- attrQue.addLast(attrToString(atts));
- }
-
- @Override
- public void endElement(final String uri, final String localName,
- final String qName) throws SAXException {
- que.removeLast();
- attrQue.removeLast();
- }
-
- @Override
- public void characters(final char[] chars, final int start, final int length)
- throws SAXException {
- final String peekLast = que.peekLast();
- if ("/objects/object/field{identifier,net.sf.joafip.performance.items.entity.Item}/value"
- .equals(peekLast)) {
- final int value = Integer.parseInt(new String(Arrays.copyOfRange(
- chars, start, start + length)));
- total++;
- if (valueSet.contains(value)) {
- count++;
- final Iterator<String> iterator = attrQue.descendingIterator();
- for (int count = 0; count < 2; count++) {
- iterator.next();
- }
- final String attrs = iterator.next();
- printWriter.print(attrs);
- printWriter.print(", value=");
- printWriter.println(value);
- }
- }
- }
-
- private String attrToString(final Attributes attrs) {
- final StringBuilder stringBuilder = new StringBuilder();
- final int length = attrs.getLength();
- for (int index = 0; index < length; index++) {
- stringBuilder.append(attrs.getQName(index));
- stringBuilder.append('=');
- stringBuilder.append(attrs.getValue(index));
- stringBuilder.append(',');
- }
- return stringBuilder.toString();
- }
-
- @Override
- public void ignorableWhitespace(final char[] chars, final int start,
- final int length) throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void processingInstruction(final String target, final String data)
- throws SAXException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void skippedEntity(final String name) throws SAXException {
- // TODO Auto-generated method stub
-
- }
-}
Modified: trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java 2011-11-13 06:40:17 UTC (rev 2969)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -27,6 +27,7 @@
import net.sf.joafip.redblacktree.RedBlackTreeTests;
import net.sf.joafip.service.ServiceTests;
import net.sf.joafip.store.StoreTests;
+import net.sf.joafip.util.UtilTests;
@NotStorableClass
public class PersistanceTestsNoLongTests {// NOPMD
@@ -39,6 +40,7 @@
final TestSuite suite = new TestSuite(
"main (speed) Tests for persistence");
// $JUnit-BEGIN$
+ suite.addTest(UtilTests.suite());
suite.addTest(MemInspectorTests.suite());
suite.addTest(OGraphTests.suite());
suite.addTest(RedBlackTreeTests.suite());
Added: trunk/joafip-testsuite/src/main/java/net/sf/joafip/util/UtilTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/util/UtilTests.java (rev 0)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/util/UtilTests.java 2011-11-18 02:52:27 UTC (rev 2970)
@@ -0,0 +1,45 @@
+/*
+ * 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.util;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import net.sf.joafip.NotStorableClass;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+@NotStorableClass
+public class UtilTests {
+
+ public static Test suite() {
+ final TestSuite suite = new TestSuite("util Tests");
+ // $JUnit-BEGIN$
+ suite.addTestSuite(TestXmlWriter.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...> - 2011-11-19 06:19:07
|
Revision: 2972
http://joafip.svn.sourceforge.net/joafip/?rev=2972&view=rev
Author: luc_peuvrier
Date: 2011-11-19 06:19:01 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
xml export namespace is now http://joafip.sourceforge.net
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/IImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/XmlImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd
trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestImport222.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel301/TestImport300.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel310/AbstractTestImport301.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/Importer.java
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...> - 2011-11-19 06:19:08
|
Revision: 2972
http://joafip.svn.sourceforge.net/joafip/?rev=2972&view=rev
Author: luc_peuvrier
Date: 2011-11-19 06:19:01 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
xml export namespace is now http://joafip.sourceforge.net
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/IImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/XmlImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd
trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestImport222.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel301/TestImport300.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel310/AbstractTestImport301.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/Importer.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -1749,7 +1749,7 @@
}
@Override
- public void xmlImport(final String directoryName)
+ public void xmlImport(final String directoryName, final boolean validating)
throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
@@ -1760,7 +1760,7 @@
assertSessionClosed();
newAccessSessionAndReadOrCreateRootObject(false);
assertNoObjectStored();
- store.xmlImport(directoryName);
+ store.xmlImport(directoryName, validating);
} catch (final StoreException exception) {
throw new FilePersistenceException(exception);
} catch (final StoreClassNotFoundException exception) {
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -1027,13 +1027,15 @@
*
* @param directoryName
* directory name where are stored exported data to import
+ * @param validating
* @throws FilePersistenceException
* @throws FilePersistenceClassNotFoundException
* @throws FilePersistenceInvalidClassException
* @throws FilePersistenceDataCorruptedException
* @throws FilePersistenceNotSerializableException
*/
- void xmlImport(String directoryName) throws FilePersistenceException,
+ void xmlImport(String directoryName, boolean validating)
+ throws FilePersistenceException,
FilePersistenceClassNotFoundException,
FilePersistenceInvalidClassException,
FilePersistenceDataCorruptedException,
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -491,11 +491,12 @@
}
@Override
- public void xmlImport(final String directoryName) throws StoreException,
- StoreClassNotFoundException, StoreInvalidClassException,
- StoreDataCorruptedException, StoreNotSerializableException {
+ public void xmlImport(final String directoryName, final boolean validating)
+ throws StoreException, StoreClassNotFoundException,
+ StoreInvalidClassException, StoreDataCorruptedException,
+ StoreNotSerializableException {
try {
- xmlImporter.doImport(directoryName);
+ xmlImporter.doImport(directoryName, validating);
} catch (final ImportException exception) {
throw new StoreException(exception);
} catch (final ImportClassNotFoundException exception) {
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -663,15 +663,17 @@
*
* @param directoryName
* directory name where are stored exported data to import
+ * @param validating
* @throws StoreException
* @throws StoreNotSerializableException
* @throws StoreDataCorruptedException
* @throws StoreInvalidClassException
* @throws StoreClassNotFoundException
*/
- void xmlImport(String directoryName) throws StoreException,
- StoreClassNotFoundException, StoreInvalidClassException,
- StoreDataCorruptedException, StoreNotSerializableException;
+ void xmlImport(String directoryName, boolean validating)
+ throws StoreException, StoreClassNotFoundException,
+ StoreInvalidClassException, StoreDataCorruptedException,
+ StoreNotSerializableException;
void setImportListener(IImportListener listener);
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -158,9 +158,10 @@
}
@Override
- public void doImport(final String directoryName) throws ImportException,
- ImportClassNotFoundException, ImportDataCorruptedException,
- ImportInvalidClassException, ImportNotSerializableException {
+ public void doImport(final String directoryName, final boolean validating)
+ throws ImportException, ImportClassNotFoundException,
+ ImportDataCorruptedException, ImportInvalidClassException,
+ ImportNotSerializableException {
numberOfImported = 0;
final File directory = new File(directoryName);
if (directory.exists()) {
@@ -173,7 +174,7 @@
synchronized (storeMutex) {
objectMap = new TreeMap<Integer, Object>();
dummyObjectSet = new HashSet<ObjectAndPersistInfo>();
- importImpl(directory);
+ importImpl(directory, validating);
try {
storeSaver.saveModification();
} catch (final StoreException exception) {
@@ -190,16 +191,18 @@
*
* @param directoryName
* directory name where are stored exported data to import
+ * @param validating
+ * true if validating according to joafip.xsd
* @throws ImportException
* @throws ImportClassNotFoundException
* @throws ImportDataCorruptedException
* @throws ImportInvalidClassException
* @throws ImportNotSerializableException
*/
- protected abstract void importImpl(final File directory)
- throws ImportException, ImportClassNotFoundException,
- ImportDataCorruptedException, ImportInvalidClassException,
- ImportNotSerializableException;
+ protected abstract void importImpl(final File directory,
+ final boolean validating) throws ImportException,
+ ImportClassNotFoundException, ImportDataCorruptedException,
+ ImportInvalidClassException, ImportNotSerializableException;
protected void setReleaseAndDataModelIdentifier(
final String previousReleaseName,
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/IImporter.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/IImporter.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/IImporter.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -36,6 +36,7 @@
*
* @param directoryName
* directory name where are stored exported data to import
+ * @param validating
* @throws StoreException
* @throws StoreNotSerializableException
* @throws StoreDataCorruptedException
@@ -47,10 +48,10 @@
* @throws ImportDataCorruptedException
* @throws ImportClassNotFoundException
*/
- void doImport(String directoryName) throws StoreException,
- StoreClassNotFoundException, StoreInvalidClassException,
- StoreDataCorruptedException, StoreNotSerializableException,
- ImportException, ImportClassNotFoundException,
- ImportDataCorruptedException, ImportInvalidClassException,
- ImportNotSerializableException;
+ void doImport(String directoryName, boolean validating)
+ throws StoreException, StoreClassNotFoundException,
+ StoreInvalidClassException, StoreDataCorruptedException,
+ StoreNotSerializableException, ImportException,
+ ImportClassNotFoundException, ImportDataCorruptedException,
+ ImportInvalidClassException, ImportNotSerializableException;
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/XmlImporter.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/XmlImporter.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/XmlImporter.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -18,16 +18,14 @@
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Deque;
import java.util.LinkedList;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.SchemaFactory;
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.store.service.IStore;
@@ -48,6 +46,12 @@
@NotStorableClass
public class XmlImporter extends AbstractImporter implements ContentHandler {// NOPMD
+ private static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
+
+ private static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
+
+ private static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
+
private Locator locator;
private Deque<ICurrentHandler> handlerStack;
@@ -60,32 +64,33 @@
}
@Override
- protected void importImpl(final File directory) throws ImportException,
- ImportClassNotFoundException, ImportDataCorruptedException,
- ImportInvalidClassException, ImportNotSerializableException {
+ protected void importImpl(final File directory, final boolean validating)
+ throws ImportException, ImportClassNotFoundException,
+ ImportDataCorruptedException, ImportInvalidClassException,
+ ImportNotSerializableException {
exportFile = new File(directory, "export.xml");
if (!exportFile.exists()) {
throw new ImportException(exportFile + " does not exists");
}
final SAXParserFactory factory = SAXParserFactory.newInstance();
- // FIXMELUC ?____why not validating ?
- factory.setValidating(false);
+ factory.setValidating(validating);
factory.setNamespaceAware(true);
- final SchemaFactory schemaFactory = SchemaFactory
- .newInstance("http://www.w3.org/2001/XMLSchema");
try {
- final InputStream inputStream = classLoaderProvider
- .getClassLoader()
- .getResourceAsStream(
- "net/sf/joafip/store/service/export_import/joafip.xsd");
- factory.setSchema(schemaFactory
- .newSchema(new Source[] { new StreamSource(inputStream) }));
+ final SAXParser saxParser = factory.newSAXParser();
+ if (validating) {
+ saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
- final SAXParser parser = factory.newSAXParser();
- final XMLReader reader = parser.getXMLReader();
+ final URI schemaSourceUri = ClassLoader.getSystemResource(
+ "net/sf/joafip/store/service/export_import/joafip.xsd")
+ .toURI();
+ saxParser.setProperty(JAXP_SCHEMA_SOURCE, new File(
+ schemaSourceUri));
+ }
+ final XMLReader reader = saxParser.getXMLReader();
reader.setErrorHandler(new XmlReaderErrorHandler(this));
reader.setContentHandler(this);
- reader.parse(new InputSource(exportFile.toURI().toString()));
+ final String sourcePath = exportFile.toURI().toString();
+ reader.parse(new InputSource(sourcePath));
} catch (SAXException exception) {
final String message = exception.getMessage();
final Exception embeddedException = exception.getException();
@@ -108,6 +113,8 @@
throw new ImportException(exception);
} catch (IllegalArgumentException exception) {
throw new ImportException(exception);
+ } catch (URISyntaxException exception) {
+ throw new ImportException(exception);
}
}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/joafip.xsd 2011-11-19 06:19:01 UTC (rev 2972)
@@ -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>
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -144,7 +144,7 @@
* Forbidden import
*/
try {
- filePersistence.xmlImport(RUNTIME);
+ filePersistence.xmlImport(RUNTIME, true);
fail("must fail");// NOPMD
} catch (final FilePersistenceException exception) {// NOPMD
// expected
@@ -176,7 +176,7 @@
/* import */
- filePersistence.xmlImport(RUNTIME);
+ filePersistence.xmlImport(RUNTIME, true);
assertEquals("", 'a', bobForExport.getCharValue());
@@ -279,7 +279,7 @@
builder.setCrashSafeMode(false);
filePersistence = builder.build();
- filePersistence.xmlImport(RUNTIME);
+ filePersistence.xmlImport(RUNTIME, true);
dataAccessSession = filePersistence.createDataAccessSession();
dataAccessSession.open();
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-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestFilePersistenceNoG.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -1,8 +1,11 @@
package net.sf.joafip.service;
+import java.lang.reflect.Method;
+
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.StorableAccess;
import net.sf.joafip.TestException;
+import net.sf.joafip.store.service.objectfortest.Bob1;
@NotStorableClass
@StorableAccess
@@ -29,6 +32,11 @@
builder.setGarbageManagement(false);
builder.setCrashSafeMode(false);
filePersistence = (FilePersistence) builder.build();
+ // FIXMELUC ______________________NoPersistenceConstraintCheck
+ // annotation
+ final Method method = Bob1.class.getDeclaredMethod(
+ "doSomethingOnOtherBob1Private", new Class<?>[] { Bob1.class });
+ filePersistence.addToNotCheckMethod(method);
}
@Override
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestImport222.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestImport222.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestImport222.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -49,7 +49,7 @@
FilePersistenceTooBigForSerializationException {
Container.skipBug222 = true;
HelperReflect.getInstance().setAlwaysAcceptNullField(true);
- filePersistence.xmlImport("../joafip/export222");
+ filePersistence.xmlImport("../joafip/export222", false);
final IDataAccessSession dataAccessSession = filePersistence
.createDataAccessSession();
dataAccessSession.open();
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel301/TestImport300.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel301/TestImport300.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel301/TestImport300.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -88,7 +88,7 @@
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception { // NOPMD
try {
filePersistence.close();
} catch (final Throwable throwable) {// NOPMD
@@ -105,7 +105,7 @@
FilePersistenceDataCorruptedException,
FilePersistenceNotSerializableException, ProxyException,
FilePersistenceTooBigForSerializationException {
- filePersistence.xmlImport("../joafip/export300");
+ filePersistence.xmlImport("../joafip/export300", false);
final IDataAccessSession dataAccessSession = filePersistence
.createDataAccessSession();
dataAccessSession.open();
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel310/AbstractTestImport301.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel310/AbstractTestImport301.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel310/AbstractTestImport301.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -58,7 +58,7 @@
FilePersistenceNotSerializableException, ProxyException,
FilePersistenceTooBigForSerializationException {
- filePersistence.xmlImport("../joafip/export301b");
+ filePersistence.xmlImport("../joafip/export301b", false);
checkObjectState();
}
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -965,10 +965,11 @@
exportPersistedClassByteCode);
}
- public void xmlImport(final String directoryName) throws StoreException,
- StoreClassNotFoundException, StoreInvalidClassException,
- StoreDataCorruptedException, StoreNotSerializableException {
- store.xmlImport(directoryName);
+ public void xmlImport(final String directoryName, final boolean validating)
+ throws StoreException, StoreClassNotFoundException,
+ StoreInvalidClassException, StoreDataCorruptedException,
+ StoreNotSerializableException {
+ store.xmlImport(directoryName, validating);
}
public ObjectAndPersistInfo getObjectAndPersistInfoOfObjectFromQueue(
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/Importer.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/Importer.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/Importer.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -78,7 +78,7 @@
filePersistence.setImportListener(this);
startTime = System.currentTimeMillis();
- filePersistence.xmlImport("runtime_perf/export");
+ filePersistence.xmlImport("runtime_perf/export", true);
System.out.println(numberOfImported + " imported, duration "// NOPMD
+ (System.currentTimeMillis() - startTime));
filePersistence.close();
Modified: trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2011-11-18 04:46:52 UTC (rev 2971)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2011-11-19 06:19:01 UTC (rev 2972)
@@ -24,10 +24,13 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import net.sf.joafip.service.TestExportImport;
+import net.sf.joafip.service.TestExportObject;
import net.sf.joafip.service.rel300.TestImport222;
import net.sf.joafip.service.rel300.TestImport222NotLazy;
-import net.sf.joafip.service.rel300.TestUseRuntime222;
-import net.sf.joafip.service.rel300.TestUseRuntime222NotLazy;
+import net.sf.joafip.service.rel301.TestImport300;
+import net.sf.joafip.service.rel310.TestImport301ConversionA;
+import net.sf.joafip.service.rel310.TestImport301ConversionB;
/**
*
@@ -44,10 +47,13 @@
public static Test suite() {
final TestSuite suite = new TestSuite("in error Tests");
// $JUnit-BEGIN$
- suite.addTestSuite(TestUseRuntime222.class);
- suite.addTestSuite(TestUseRuntime222NotLazy.class);
+ suite.addTestSuite(TestExportImport.class);
+ suite.addTestSuite(TestExportObject.class);
suite.addTestSuite(TestImport222.class);
suite.addTestSuite(TestImport222NotLazy.class);
+ suite.addTestSuite(TestImport300.class);
+ suite.addTestSuite(TestImport301ConversionA.class);
+ suite.addTestSuite(TestImport301ConversionB.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...> - 2011-11-22 05:40:49
|
Revision: 2977
http://joafip.svn.sourceforge.net/joafip/?rev=2977&view=rev
Author: luc_peuvrier
Date: 2011-11-22 05:40:43 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
refactoring
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO.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/SerializerObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.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/proxy/AbstractObjectIoManagerForProxyTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/DataBlock.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.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/TestHeapFileDataManagerBackup.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-22 05:40:50
|
Revision: 2977
http://joafip.svn.sourceforge.net/joafip/?rev=2977&view=rev
Author: luc_peuvrier
Date: 2011-11-22 05:40:43 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
refactoring
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO.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/SerializerObjectIOManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.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/proxy/AbstractObjectIoManagerForProxyTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/DataBlock.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.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/TestHeapFileDataManagerBackup.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIOManagerForProxyObjectIO.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -169,9 +169,6 @@
void unsetProxyObjectState(ObjectAndPersistInfo objectAndItsClassInfo)
throws ObjectIOException, ObjectIOInvalidClassException;
- void saveAndUnsetProxyObjectState(ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException;
-
IProxyManagerForObjectIO getProxyManager2();
ClassInfoFactory getClassInfoFactory();
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 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/ObjectIOManager.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -305,14 +305,6 @@
}
@Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- autoSave();
- unsetProxyObjectState(objectAndItsClassInfo);
- }
-
- @Override
protected DataRecordIdentifier associateNewDataRecordIdentifierToObject(
final ObjectAndPersistInfo objectAndPersistInfo)
throws ObjectIODataCorruptedException, ObjectIOException {
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 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/SerializerObjectIOManager.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -375,13 +375,6 @@
throw new ObjectIOException(MUST_NOT_BE_CALLED);
}
- @Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- throw new ObjectIOException(MUST_NOT_BE_CALLED);
- }
-
/** not maintain in memory for joafip serialization in one data record */
@Override
public boolean isMaintainInMemoryEnabled() {
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-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyCallBack.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -65,8 +65,6 @@
private boolean wasLoaded;
- private boolean toUnload;
-
/**
* the proxy instance and persistence information for which is this proxy
* callback
@@ -264,10 +262,6 @@
@Override
public void constructorEnd$JOAFIP$() {
inObjectCount--;
- // if (autoSaveEnabled) {
- // unLoadAction(getInstance$JOAFIP$());
- // }
- toUnload = false;
assert inObjectCount >= 0 : "running in object count can not be negative, is "
+ inObjectCount;
}
@@ -276,7 +270,6 @@
@SuppressWarnings("PMD")
public void methodEnd$JOAFIP$() {
synchronized (storeMutex) {
- final ObjectAndPersistInfo instanceAndPersistInfo = getInstance$JOAFIP$();
inObjectCount--;
// ASSERTX
assert inObjectCount >= 0 : "running in object count can not be negative, is "
@@ -290,28 +283,11 @@
throw new ProxyInterceptException(exception);
}
}
- unLoadAction(instanceAndPersistInfo);
}
}
}
}
- private void unLoadAction(final ObjectAndPersistInfo instanceAndPersistInfo) {
- if (toUnload) {
- toUnload = false;
- loaded = false;
- assert instanceAndPersistInfo != null;
- try {
- objectIOManager
- .saveAndUnsetProxyObjectState(instanceAndPersistInfo);
- } catch (Exception exception) {
- LOGGER.error("method end interception error", exception);
- throw new ProxyInterceptException(
- instanceAndPersistInfo.toString(), exception);
- }
- }
- }
-
@Override
@SuppressWarnings("PMD")
public boolean isLoaded$JOAFIP$() throws ObjectIOException {
@@ -347,16 +323,14 @@
/*
* inObjectCount==0 because can not unload object when running its code
*/
- if (loaded) {
- if (!loading && (!exclusiveAccessSession || inObjectCount == 0)) {
- toUnload = false;
- loaded = false;
- objectIOManager.unsetProxyObjectState(getInstance$JOAFIP$());
- } else {
- toUnload = true;
- }
- } else {
- toUnload = false;
+ // FIXMELUC __________________________unload !exclusiveAccessSession
+ if (loaded && !loading && inObjectCount == 0) {
+ // if (loaded) {
+ // if (!loading && (!exclusiveAccessSession || inObjectCount == 0))
+ // {
+ loaded = false;
+ objectIOManager.unsetProxyObjectState(getInstance$JOAFIP$());
+ // }
}
// }
}
@@ -366,7 +340,6 @@
public void setIsLoaded$JOAFIP$() throws ObjectIOException {
if (!this.loaded) {
this.loaded = true;
- this.toUnload = false;
objectIOManager.newObjectLoaded();
}
}
@@ -376,7 +349,6 @@
public void setIsLoadedNoSave$JOAFIP$() {
if (!this.loaded) {
this.loaded = true;
- this.toUnload = false;
}
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -67,6 +67,7 @@
visitedRecordManager = store.getVisitedRecordManager();
objectIoManager = store.getObjectIOManager();
heapRecordableManager = store.getHeapRecordableManager();
+ store.addToNotCheckMethod(Bob1.class);
}
@Override
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -329,13 +329,6 @@
}
@Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- throw new UnsupportedOperationException();
- }
-
- @Override
public void dataRecordIdentifierAssociatedToObjectSetted(
final ObjectAndPersistInfo objectAndItsClassInfo)
throws ObjectIOException {
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 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/serialize/AbstractObjectIOTest.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -368,13 +368,6 @@
// nothing to implement
}
- @Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- // nothing to implement
- }
-
public boolean isGarbageManagement() { // NOPMD
// nothing to implement
return false;
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/AbstractObjectIoManagerForProxyTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/AbstractObjectIoManagerForProxyTest.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/AbstractObjectIoManagerForProxyTest.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -167,13 +167,6 @@
}
@Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- setted = false;
- }
-
- @Override
@SuppressWarnings("PMD")
public ProxyManager2 getProxyManager2() {
// no implementation
@@ -187,7 +180,7 @@
@Override
public boolean isExclusiveAccessSession() {
- return false;
+ return true;
}
@Override
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -240,13 +240,6 @@
}
@Override
- public void saveAndUnsetProxyObjectState(
- final ObjectAndPersistInfo objectAndItsClassInfo)
- throws ObjectIOException, ObjectIOInvalidClassException {
- // no implementation
- }
-
- @Override
public boolean isExclusiveAccessSession() {
return false;
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -72,6 +72,7 @@
new Class<?>[] { String.class },
new Object[] { "a name" }, storageInfo, this,
DataRecordIdentifier.LAST, true);
+ assertEquals(0, proxyManager2.getInObjectCount(object));
inConstruction = false;
assertTrue("must say is a proxy",
ProxyManager2.isProxyOrEnhanced(object));
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-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -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;
/**
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -49,13 +49,13 @@
private static final long serialVersionUID = 8579792598621073099L;
private int blockLength;
-
+
private DataRecordIdentifier nextIdentifier;
private long dataLength;
private int numberOfDataRecord;
-
+
public int getBlockLength() {
return blockLength;
}
@@ -116,8 +116,8 @@
private void set(final BlockDataManagerHeader header) {
this.dataLength = header.dataLength;
this.nextIdentifier = header.nextIdentifier;
- this.blockLength=header.blockLength;
- this.numberOfDataRecord=header.numberOfDataRecord;
+ this.blockLength = header.blockLength;
+ this.numberOfDataRecord = header.numberOfDataRecord;
}
public byte[] get() throws HeapException {
@@ -142,10 +142,10 @@
private void readObject(final ObjectInputStream input) throws IOException,
ClassNotFoundException {
- blockLength=input.readInt();
+ blockLength = input.readInt();
dataLength = input.readLong();
final long value = input.readLong();
nextIdentifier = new DataRecordIdentifier(value);
- numberOfDataRecord=input.readInt();
+ numberOfDataRecord = input.readInt();
}
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/DataBlock.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/DataBlock.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/DataBlock.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -25,17 +25,18 @@
/**
*
* @author luc peuvrier
- *
+ *
*/
public class DataBlock {
private final long positionInFile;
-
+
private boolean toWrite;
-
+
private final byte[] data;
- public DataBlock(final long positionInFile,final boolean toWrite,final byte[] data) { //NOPMD
+ public DataBlock(final long positionInFile, final boolean toWrite,
+ final byte[] data) { // NOPMD
super();
this.positionInFile = positionInFile;
this.toWrite = toWrite;
@@ -55,6 +56,6 @@
}
public byte[] getData() {
- return data; //NOPMD
+ return data; // NOPMD
}
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -116,7 +116,8 @@
* @throws HeapException
*
*/
- protected void createHeapFileDataManager(final boolean removeFile) throws HeapException {
+ protected void createHeapFileDataManager(final boolean removeFile)
+ throws HeapException {
final HeapFileSetup setup = new HeapFileSetup(dataFile,
true/* crashSafeMode */, false/* useCacheMode */,
false/* deleteRenaming */, false/* clearResizeFile */, 1, 0,
@@ -127,15 +128,17 @@
heapDataManager.startService(removeFile);
}
- protected void createBlockDataManager(final boolean removeFile) throws HeapException {
- heapDataManager = new BlockDataManager(dataFilePath,20000);
+ protected void createBlockDataManager(final boolean removeFile)
+ throws HeapException {
+ heapDataManager = new BlockDataManager(dataFilePath, 20000);
heapDataManager.startService(removeFile);
}
-
- protected abstract void createHeap(final boolean removeFile) throws HeapException;
+ protected abstract void createHeap(final boolean removeFile)
+ throws HeapException;
+
protected abstract boolean manageFreeRecord();
-
+
/**
* @throws HeapException
*
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 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/BlockDataManager.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -195,7 +195,7 @@
final long position = getRecordPositionInfile(dataRecordIdentifier);
final boolean deleted;
final byte[] lengthData = new byte[2];
- final int read = read(position, 0, lengthData,true);
+ final int read = read(position, 0, lengthData, true);
if (read == 2) {
final int length = (((int) lengthData[0]) & 0xff) << 8
| (((int) lengthData[1]) & 0xff);
@@ -224,7 +224,7 @@
try {
final long position = getRecordPositionInfile(dataRecordIdentifier);
byte[] data = new byte[2];
- final int read = read(position, 0, data,true);
+ final int read = read(position, 0, data, true);
if (read == 2) {
final int length = (((int) data[0]) & 0xff) << 8
| (((int) data[1]) & 0xff);
@@ -233,7 +233,7 @@
data = null;// NOPMD
} else {
data = new byte[length];
- read(position, 2, data,true);
+ read(position, 2, data, true);
}
} else {
data = null;// NOPMD
@@ -260,7 +260,7 @@
final boolean created;
final byte[] lengthData = new byte[2];
int previousLength = -1;
- final int read = read(position, 0, lengthData,true);
+ final int read = read(position, 0, lengthData, true);
if (read == 2) {
previousLength = (((int) lengthData[0]) & 0xff) << 8
| (((int) lengthData[1]) & 0xff);
@@ -291,7 +291,7 @@
final long position = getRecordPositionInfile(dataRecordIdentifier);
final boolean hasDatarecord;
final byte[] lengthData = new byte[2];
- final int read = read(position, 0, lengthData,true);
+ final int read = read(position, 0, lengthData, true);
if (read == 2) {
final int length = (((int) lengthData[0]) & 0xff) << 8
| (((int) lengthData[1]) & 0xff);
@@ -337,7 +337,7 @@
long position = firstRecordPositionInfile;
final byte[] lengthData = new byte[2];
do {
- final int read = read(position, 0, lengthData,false);
+ final int read = read(position, 0, lengthData, false);
if (read == 2) {
final int length = (((int) lengthData[0]) & 0xff) << 8
| (((int) lengthData[1]) & 0xff);
@@ -475,7 +475,7 @@
throws FileIOException {
DataBlock dataBlock = cacheMap.get(position);
if (dataBlock == null) {
- dataBlock = readInFile(position,true);
+ dataBlock = readInFile(position, true);
if (dataBlock == null) {
final byte[] recordData = new byte[header.getBlockLength()];
dataBlock = new DataBlock(position, true, recordData);
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerBackup.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerBackup.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerBackup.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -38,7 +38,8 @@
super();
}
- public TestHeapFileDataManagerBackup(final String name) throws TestException {
+ public TestHeapFileDataManagerBackup(final String name)
+ throws TestException {
super(name);
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -30,7 +30,8 @@
super();
}
- public TestHeapFileDataManagerFreeing(final String name) throws TestException {
+ public TestHeapFileDataManagerFreeing(final String name)
+ throws TestException {
super(name);
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -31,7 +31,8 @@
super();
}
- public TestHeapFileDataMgrMemoryLeak(final String name) throws TestException {
+ public TestHeapFileDataMgrMemoryLeak(final String name)
+ throws TestException {
super(name);
}
Modified: trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java
===================================================================
--- trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java 2011-11-21 19:53:58 UTC (rev 2976)
+++ trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java 2011-11-22 05:40:43 UTC (rev 2977)
@@ -47,7 +47,8 @@
super();
}
- public TestHeapFileDataMgrWithScenario(final String name) throws TestException {
+ public TestHeapFileDataMgrWithScenario(final String name)
+ throws TestException {
super(name);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-22 06:53:37
|
Revision: 2978
http://joafip.svn.sourceforge.net/joafip/?rev=2978&view=rev
Author: luc_peuvrier
Date: 2011-11-22 06:53:30 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
added test for auto save
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestAutoSave.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
Added Paths:
-----------
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveInMethodTest.java
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveWhenConstructTest.java
Removed Paths:
-------------
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java 2011-11-22 05:40:43 UTC (rev 2977)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -292,6 +292,8 @@
.toString();
assert objectAndPersistInfo.isLoaded() : objectAndPersistInfo
.toString();
+ assert persisted;
+ assert dataRecordIdentifier == null;
objectAndPersistInfo.setStorageInfo(storageInfo);
// objectIOManager.objectIsAccessed(objectAndPersistInfo);
// objectAndPersistInfo.setNewObject(true);
Added: trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveInMethodTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveInMethodTest.java (rev 0)
+++ trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveInMethodTest.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -0,0 +1,38 @@
+package net.sf.joafip.entity.rel400;
+
+import net.sf.joafip.store.service.proxy.IInstanceFactory;
+
+public class BobForAutoSaveInMethodTest {
+
+ private final BobASHeld held;
+
+ private int value;
+
+ public BobForAutoSaveInMethodTest(final IInstanceFactory instanceFactory) {
+ super();
+ held = BobASHeld.newInstance(instanceFactory);
+ }
+
+ public static BobForAutoSaveInMethodTest newInstance(
+ final IInstanceFactory instanceFactory) {
+ final BobForAutoSaveInMethodTest newInstance;
+ if (instanceFactory == null) {
+ newInstance = new BobForAutoSaveInMethodTest(instanceFactory);
+ } else {
+ newInstance = (BobForAutoSaveInMethodTest) instanceFactory
+ .newInstance(BobForAutoSaveInMethodTest.class,
+ new Class<?>[] { IInstanceFactory.class },
+ new Object[] { instanceFactory });
+ }
+ return newInstance;
+ }
+
+ public void incrementValue() {
+ held.setOpened(true);
+ value++;
+ }
+
+ public int getValue() {
+ return value;
+ }
+}
Deleted: trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java 2011-11-22 05:40:43 UTC (rev 2977)
+++ trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -1,44 +0,0 @@
-/*
- * Copyright 2010 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.entity.rel400;
-
-import net.sf.joafip.store.service.objectfortest.Bob1;
-
-/**
- *
- * @author luc peuvrier
- *
- */
-public class BobForAutoSaveTest {
-
- private final int val;
-
- public BobForAutoSaveTest(final Bob1 bob1) {
- super();
- this.val = bob1.getVal();
- }
-
- public int getVal() {
- return val;
- }
-}
Copied: trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveWhenConstructTest.java (from rev 2977, trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java)
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveWhenConstructTest.java (rev 0)
+++ trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveWhenConstructTest.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2010 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.entity.rel400;
+
+import net.sf.joafip.store.service.objectfortest.Bob1;
+
+/**
+ *
+ * @author luc peuvrier
+ *
+ */
+public class BobForAutoSaveWhenConstructTest {
+
+ private final int val;
+
+ public BobForAutoSaveWhenConstructTest(final Bob1 bob1) {
+ super();
+ this.val = bob1.getVal();
+ }
+
+ public int getVal() {
+ return val;
+ }
+}
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestAutoSave.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestAutoSave.java 2011-11-22 05:40:43 UTC (rev 2977)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestAutoSave.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -34,7 +34,8 @@
import net.sf.joafip.entity.rel400.BobASDelegatingListenDelegate;
import net.sf.joafip.entity.rel400.BobASWithTransientCaller;
import net.sf.joafip.entity.rel400.BobAsDelegateNotifyDelegating;
-import net.sf.joafip.entity.rel400.BobForAutoSaveTest;
+import net.sf.joafip.entity.rel400.BobForAutoSaveInMethodTest;
+import net.sf.joafip.entity.rel400.BobForAutoSaveWhenConstructTest;
import net.sf.joafip.entity.rel400.KeyDef;
import net.sf.joafip.java.util.PTreeMap;
import net.sf.joafip.service.FilePersistence;
@@ -115,6 +116,7 @@
filePersistence.maintainInMemorySetup(0);// zero to save at each access,
// needed by the test
filePersistence.setMaintainedInMemoryEnabled(true);
+ filePersistence.addToNotCheckMethod(Bob1.class);
session = filePersistence.createExclusiveDataAccessSession();
}
@@ -264,8 +266,8 @@
assertFalse("must not be loaded",
ProxyManager2.proxiedObjectIsLoaded(bob1));
saveDoneFlag = false;
- final BobForAutoSaveTest bobForAutoSaveTest = (BobForAutoSaveTest) instanceFactory
- .newInstance(BobForAutoSaveTest.class,
+ final BobForAutoSaveWhenConstructTest bobForAutoSaveTest = (BobForAutoSaveWhenConstructTest) instanceFactory
+ .newInstance(BobForAutoSaveWhenConstructTest.class,
new Class[] { Bob1.class }, new Object[] { bob1 });
assertTrue(MUST_SAVE, saveDoneFlag);
session.setObject(KEY, bobForAutoSaveTest);
@@ -503,6 +505,36 @@
assertFalse("must not has next", iterator.hasNext());
}
+ public void testAutoSaveInMethod() throws FilePersistenceException,
+ FilePersistenceClassNotFoundException,
+ FilePersistenceInvalidClassException,
+ FilePersistenceDataCorruptedException,
+ FilePersistenceNotSerializableException,
+ FilePersistenceTooBigForSerializationException, ProxyException {
+ final IInstanceFactory instanceFactory = session.getInstanceFactory();
+ session.open();
+ BobForAutoSaveInMethodTest bob = BobForAutoSaveInMethodTest
+ .newInstance(instanceFactory);
+ assertEquals("bad initial state", 0, bob.getValue());
+ saveDoneFlag = false;
+ int expectedIncrement = 1;
+ for (int count = 0; count < 5; count++) {
+ bob.incrementValue();
+ assertTrue(MUST_SAVE, saveDoneFlag);
+ assertTrue("must be unloaded", ProxyManager2.isUnloaded(bob));
+ assertEquals("bad state", expectedIncrement, bob.getValue());
+ expectedIncrement++;
+ }
+ session.setObject(KEY, bob);
+ session.close();
+
+ session.open();
+ bob = (BobForAutoSaveInMethodTest) session.getObject(KEY);
+ assertEquals("bad state", expectedIncrement - 1, bob.getValue());
+ session.close();
+
+ }
+
@Override
public boolean doSave() {
return true;
Modified: trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
===================================================================
--- trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2011-11-22 05:40:43 UTC (rev 2977)
+++ trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java 2011-11-22 06:53:30 UTC (rev 2978)
@@ -24,13 +24,8 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import net.sf.joafip.service.TestExportImport;
-import net.sf.joafip.service.TestExportObject;
-import net.sf.joafip.service.rel300.TestImport222;
-import net.sf.joafip.service.rel300.TestImport222NotLazy;
-import net.sf.joafip.service.rel301.TestImport300;
-import net.sf.joafip.service.rel310.TestImport301ConversionA;
-import net.sf.joafip.service.rel310.TestImport301ConversionB;
+import net.sf.joafip.store.service.TestGarbageForegroundFile;
+import net.sf.joafip.store.service.proxy.TestProxyCreationConstructed;
/**
*
@@ -47,13 +42,8 @@
public static Test suite() {
final TestSuite suite = new TestSuite("in error Tests");
// $JUnit-BEGIN$
- suite.addTestSuite(TestExportImport.class);
- suite.addTestSuite(TestExportObject.class);
- suite.addTestSuite(TestImport222.class);
- suite.addTestSuite(TestImport222NotLazy.class);
- suite.addTestSuite(TestImport300.class);
- suite.addTestSuite(TestImport301ConversionA.class);
- suite.addTestSuite(TestImport301ConversionB.class);
+ suite.addTestSuite(TestGarbageForegroundFile.class);
+ suite.addTestSuite(TestProxyCreationConstructed.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...> - 2011-11-22 06:53:37
|
Revision: 2978
http://joafip.svn.sourceforge.net/joafip/?rev=2978&view=rev
Author: luc_peuvrier
Date: 2011-11-22 06:53:30 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
added test for auto save
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestAutoSave.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
Added Paths:
-----------
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveInMethodTest.java
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveWhenConstructTest.java
Removed Paths:
-------------
trunk/joafip/src/test/java/net/sf/joafip/entity/rel400/BobForAutoSaveTest.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-23 02:54:48
|
Revision: 2979
http://joafip.svn.sourceforge.net/joafip/?rev=2979&view=rev
Author: luc_peuvrier
Date: 2011-11-23 02:54:42 +0000 (Wed, 23 Nov 2011)
Log Message:
-----------
weak management of object corrected
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/util/DebugUtil.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2011-11-23 02:54:49
|
Revision: 2979
http://joafip.svn.sourceforge.net/joafip/?rev=2979&view=rev
Author: luc_peuvrier
Date: 2011-11-23 02:54:42 +0000 (Wed, 23 Nov 2011)
Log Message:
-----------
weak management of object corrected
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/util/DebugUtil.java
trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.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-22 06:53:30 UTC (rev 2978)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2011-11-23 02:54:42 UTC (rev 2979)
@@ -119,6 +119,8 @@
private ObjectAndPersistInfoWeakReference weakReference;
+ private boolean weaked;
+
public FieldInfo[] fieldToSetInfo;
private IProxyCallBackToImplement proxyCallBack;
@@ -405,21 +407,24 @@
/**
*
+ * @param queue
+ * @return true if weaked, false if not weaked because already weaked or
+ * acceded
*/
public boolean weakReferenceOnObject(
final ReferenceQueue<? super Object> queue) {
// object!=null may be unreferenced object and statemap not already
// cleared
- final boolean weaked;
- if (isNotAcceded() && weakReference == null && object != null) {
- weakReference = new ObjectAndPersistInfoWeakReference(object, this,
- queue);
+ final boolean wasWeaked = weaked;
+ if (!weaked && isNotAcceded() && object != null) {
+ if (weakReference == null) {
+ weakReference = new ObjectAndPersistInfoWeakReference(object,
+ this, queue);
+ }
clear();// Unreferenced
weaked = true;
- } else {
- weaked = false;
}
- return weaked;
+ return !wasWeaked && weaked;
}
private boolean isNotAcceded() {
@@ -435,37 +440,37 @@
@Override
protected Object getObjectForEquals() {
final Object result;
- if (weakReference == null) {
+ if (weaked) {
+ result = weakReference.get();
+ } else {
result = this.object;
- } else {
- result = weakReference.get();
}
return result;
}
public boolean referenceLost() {
- return weakReference != null && weakReference.get() == null;
+ return weaked && weakReference.get() == null;
}
@Override
public Object getObject() {
final Object result;
- if (weakReference == null) {
- result = this.object;
- } else {
+ if (weaked) {
result = weakReference.get();
assert result != null : "reference lost " + toString();
+ } else {
+ result = this.object;
}
return result;
}
public boolean unWeakReferenceOnObject() {
- if (weakReference != null) {
+ if (weaked) {
assert object == null;
final Object object = weakReference.get();
if (object != null) {
setObject(object);
- weakReference = null;// NOPMD
+ weaked = false;
objectStateMap.unWeakReferenceOnObject(this);
}
}
@@ -473,19 +478,19 @@
}
public boolean isWeak() {
- return weakReference != null;
+ return weaked;
}
public boolean isNotWeak() {
- return weakReference == null;
+ return true ^ weaked;
}
public boolean hasNoReferences() {
- return weakReference != null && weakReference.get() == null;
+ return weaked && weakReference.get() == null;
}
public boolean hasReferences() {
- return weakReference == null || weakReference.get() != null;
+ return !weaked || weakReference.get() != null;
}
public int getJoafipReleaseId() {
@@ -602,7 +607,7 @@
return /**/"object[" +
/**/(object == null ?
/**/"null" :
- /**/((objectClass == null ? "no class" : objectClass.getName()) +
+ /**/(objectClass.getName() +
/**/"@" + hashCode()))
/**/+ "]";
@@ -610,17 +615,18 @@
private String weakToString() {
final Object weak;
- if (weakReference == null) {
+ if (weaked) {
+ weak = weakReference.get();
+ } else {
weak = null;
- } else {
- weak = weakReference.get();
}
return /**/"weakReference["
- /**/+ (weakReference == null ?
- /**/"none" : // NOPMD
- /**/(weak == null ? "null" : (weak.getClass()
- .getName() + "@" + System
- .identityHashCode(weak))))
+ /**/+ (weaked ?
+ /**/(weak == null ? "null"
+ : (weak.getClass().getName() + "@" + System
+ .identityHashCode(weak))) :
+ /**/"none" // NOPMD
+ )
/**/+ "]";
}
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-22 06:53:30 UTC (rev 2978)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectStateMap.java 2011-11-23 02:54:42 UTC (rev 2979)
@@ -32,6 +32,7 @@
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>
@@ -80,7 +81,7 @@
private boolean stopExpungeThread;
- private final Thread expungeThread;
+ private Thread expungeThread;
/**
* empty object state informations at construction
@@ -88,6 +89,10 @@
*/
public ObjectStateMap() {// NOPMD explicit constructor
super();
+ // startThread();
+ }
+
+ private void startThread() {
expungeThread = new Thread(this, "objectStateExpunge-Thread");
expungeThread.setDaemon(true);
expungeThread.setPriority(Thread.MAX_PRIORITY);
@@ -95,6 +100,12 @@
}
public void close() {
+ if (exclusiveAccessSession) {
+ stopThread();
+ }
+ }
+
+ private void stopThread() {
synchronized (this) {
if (!stopExpungeThread) {
stopExpungeThread = true;
@@ -110,14 +121,19 @@
}
public void setExclusiveAccessSession(final boolean exclusiveAccessSession) {
+ final boolean wasExclusiveAccessSession = this.exclusiveAccessSession;
this.exclusiveAccessSession = exclusiveAccessSession;
+ if (wasExclusiveAccessSession != this.exclusiveAccessSession) {
+ if (this.exclusiveAccessSession) {
+ startThread();
+ } else {
+ stopThread();
+ }
+ }
}
public ObjectAndPersistInfo getObjectPersistenceStateByObjectIdentityKey(
final IObjectIdentityKey objectIdentityKey) {
- // if (exclusiveAccessSession) {
- // expunge();
- // }
synchronized (this) {
return stateMap.get(objectIdentityKey);
}
@@ -125,9 +141,6 @@
public void clearObjectAndPersistInfoByDataRecordIdentifier(
final DataRecordIdentifier dataRecordIdentifier) {
- // if (exclusiveAccessSession) {
- // expunge();
- // }
synchronized (this) {
stateMapByIdentifier.remove(dataRecordIdentifier);
}
@@ -142,9 +155,6 @@
synchronized (this) {
// ASSERTX
assert objectAndPersistInfo.getObjectStateMap() == this;
- // if (exclusiveAccessSession) {
- // expunge();
- // }
// ASSERTX
assert objectAndPersistInfo.isNotWeak();
// ASSERTX
@@ -174,7 +184,6 @@
synchronized (this) {
ObjectAndPersistInfo objectAndPersistInfo;
if (exclusiveAccessSession) {
- // expunge();
objectAndPersistInfo = stateMapByIdentifier.get(identifier);
if (objectAndPersistInfo != null
&& !objectAndPersistInfo.unWeakReferenceOnObject()) {
@@ -204,9 +213,6 @@
synchronized (this) {
// ASSERTX
assert object != null : "null has not persistent state";
- // if (exclusiveAccessSession) {
- // expunge();
- // }
key.setObject(object);
final ObjectAndPersistInfo objectAndPersistInfo = stateMap.get(key);
// key must not more reference object
@@ -266,9 +272,6 @@
objectAndPersistInfo.setObjectStateMap(this);
// ASSERTX
assert objectAndPersistInfo.getObject() != null : "null object";
- // if (exclusiveAccessSession) {
- // expunge();
- // }
if (stateMap.put(objectAndPersistInfo, objectAndPersistInfo) != null) {
throw new ObjectIOException(
"persistence state already exists for "
@@ -316,9 +319,6 @@
public boolean objectHasPersistenceState(
final ObjectAndPersistInfo objectAndPersistInfo) {
synchronized (this) {
- // if (exclusiveAccessSession) {
- // expunge();
- // }
return stateMap.containsKey(objectAndPersistInfo);
}
}
@@ -330,9 +330,6 @@
*/
public void clear() throws ObjectIOException {
synchronized (this) {
- // if (exclusiveAccessSession) {
- // expunge();
- // }
stateMap.clear();
stateMapByIdentifier.clear();
key.clear();
@@ -383,7 +380,6 @@
// objectAndPersistInfo.weakReferenceOnObject();
// }
- // expunge();
// do not clear queueHead and queueTail
ObjectAndPersistInfo current = queueHead;
@@ -421,7 +417,6 @@
public void unWeakReferenceOnObject(final ObjectAndPersistInfo toUnWeak) {
if (exclusiveAccessSession) {
synchronized (this) {
- // expunge();
// final ObjectAndPersistInfo previous = stateMap.put(toUnWeak,
// toUnWeak);
// assert previous == null : "persistence state already set";
@@ -454,21 +449,6 @@
final Collection<ObjectAndPersistInfo> objectHavingStateSet =
/**/new LinkedHashSet<ObjectAndPersistInfo>();
- // if (exclusiveAccessSession) {
- // expunge();
- // for (ObjectAndPersistInfo objectAndPersistInfo :
- // stateMap.values()) {
- // if (objectAndPersistInfo.isNotWeak()) {
- // objectHavingStateSet.add(objectAndPersistInfo);
- // }
- // }
- // } else {
- // for (ObjectAndPersistInfo objectAndPersistInfo :
- // stateMap.values()) {
- // objectHavingStateSet.add(objectAndPersistInfo);
- // }
- // }
-
ObjectAndPersistInfo current = referencedQueueHead;
while (current != null) {
objectHavingStateSet.add(current);
@@ -489,10 +469,9 @@
final ObjectAndPersistInfo objectAndPersistInfoOfObject) {
if (exclusiveAccessSession) {
synchronized (this) {
- // expunge();
final boolean unWeaked = objectAndPersistInfoOfObject
.unWeakReferenceOnObject();
- assert unWeaked;
+ assert unWeaked : objectAndPersistInfoOfObject.toString();
assert stateMap.containsKey(objectAndPersistInfoOfObject) : "not in state map: "
+ objectAndPersistInfoOfObject.toString();
if (trackingOfAccessedObjectEnabled) {
@@ -527,7 +506,6 @@
*/
public Set<ObjectAndPersistInfo> mostAccessedObject(final int quota) {
synchronized (this) {
- // expunge();
final Set<ObjectAndPersistInfo> set = new LinkedHashSet<ObjectAndPersistInfo>();
int count = 0;
ObjectAndPersistInfo current = queueHead;
@@ -545,7 +523,6 @@
@Fortest
public List<ObjectAndPersistInfo> getObjectAndPersistInfoOfObjectFromQueue() {
synchronized (this) {
- // expunge();
final List<ObjectAndPersistInfo> list = new LinkedList<ObjectAndPersistInfo>();
ObjectAndPersistInfo current = queueHead;
while (current != null) {
@@ -562,7 +539,10 @@
while (!stopExpungeThread) {
final ObjectAndPersistInfoWeakReference ref = (ObjectAndPersistInfoWeakReference) referenceQueue
.remove(/* timeout ? */);
- if (ref != null) {/* can be null only if timeout */
+ if (!stopExpungeThread && ref != null) {/*
+ * can be null only if
+ * timeout
+ */
synchronized (ObjectStateMap.this) {
final ObjectAndPersistInfo objectAndPersistInfo = ref
.getObjectAndPersistInfo();
@@ -581,19 +561,23 @@
}
private void removeWeaked(final ObjectAndPersistInfo toRemove) {
- stateMap.remove(toRemove);
- stateMapByIdentifier.remove(toRemove.dataRecordIdentifier);
- // FIXMELUC ?___assert failure, why ?
- // assert x == toRemove : x + "\n" + toRemove;
+ final ObjectAndPersistInfo removed = stateMap.remove(toRemove);
+ assert removed != null : toRemove.toString();
+ /* removed = */stateMapByIdentifier
+ .remove(toRemove.dataRecordIdentifier);
+ // bad assert, may be no data record associated to object
+ // assert removed == toRemove : removed + "\n" + toRemove;
toRemove.clearSubstitution();
removeFromQueue(toRemove);
}
private void removeFromQueue(final ObjectAndPersistInfo toRemove) {
- // FIXMELUC ___may be not needed to clear queue link
toRemove.setObjectStateMap(null);
final ObjectAndPersistInfo previous = toRemove.previous;
- assert previous != null || toRemove == queueHead; // NOPMD
+ assert previous != null || toRemove == queueHead : // NOPMD
+ /**/"previousIsNull=" + (previous == null) + " nextIsNull="
+ + (toRemove.next == null) + // NOPMD
+ /**/" " + toRemove.toString();
final ObjectAndPersistInfo next = toRemove.next;
assert next != null || toRemove == queueTail;// NOPMD
toRemove.next = null;// NOPMD
Modified: trunk/joafip/src/main/java/net/sf/joafip/util/DebugUtil.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/util/DebugUtil.java 2011-11-22 06:53:30 UTC (rev 2978)
+++ trunk/joafip/src/main/java/net/sf/joafip/util/DebugUtil.java 2011-11-23 02:54:42 UTC (rev 2979)
@@ -103,7 +103,7 @@
final Class<?> toClass) {
final String stackTrace;
if (throwable == null) {
- stackTrace = "";
+ stackTrace = "none";
} else {
final StackTraceElement[] stackTraceElements = throwable
.getStackTrace();
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-22 06:53:30 UTC (rev 2978)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/autosave/rbtree/MainRBTree.java 2011-11-23 02:54:42 UTC (rev 2979)
@@ -69,20 +69,26 @@
session.open();
- final RBTree tree = RBTree.newInstance(instanceFactory);
+ try {
+ final RBTree tree = RBTree.newInstance(instanceFactory);
+ session.setObject("tree", tree);
- for (int count = 0; count < 1000000; count++) {
- tree.append("" + count);// NOPMD
- if (count % 1000 == 0) {
- System.out.println("c=" + count);// NOPMD
+ for (int count = 0; count < 1000000; count++) {
+ tree.append("" + count);// NOPMD
+ if (count % 1000 == 0) {
+ System.out.println("c=" + count);// NOPMD
+ }
+ if (count > 8) {
+ tree.remove("" + (count - 8));// NOPMD
+ }
}
- if (count > 8) {
- tree.remove("" + (count - 8));// NOPMD
- }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ session.close();
}
- session.close();
-
+ filePersistence.xmlExport("runtime", "runtime/temp", false);
filePersistence.close();
}
Modified: trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java
===================================================================
--- trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java 2011-11-22 06:53:30 UTC (rev 2978)
+++ trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java 2011-11-23 02:54:42 UTC (rev 2979)
@@ -195,7 +195,7 @@
public boolean isBlack() throws RBTException {
if (noColorSetted) {
- throw new RBTException(COLOR_NOT_SET);
+ throw new RBTException(COLOR_NOT_SET + "\n" + toString());
}
return color == RedBlackTree.BLACK;
}
@@ -207,7 +207,7 @@
public boolean isRed() throws RBTException {
if (noColorSetted) {
- throw new RBTException(COLOR_NOT_SET);
+ throw new RBTException(COLOR_NOT_SET + "\n" + toString());
}
return color == RedBlackTree.RED;
}
@@ -255,7 +255,7 @@
public boolean getColor() throws RBTException {// NOPMD color is a value
if (noColorSetted) {
- throw new RBTException(COLOR_NOT_SET);
+ throw new RBTException(COLOR_NOT_SET + "\n" + toString());
}
return color;
}
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-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 ? nu...
[truncated message content] |
|
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-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...> - 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...> - 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...
[truncated message content] |
|
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-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
=======...
[truncated message content] |
|
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-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: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/
Modified: trunk/joafip-parent/pom.xml
===================================================================
--- trunk/joafip-parent/pom.xml 2012-03-03 02:23:44 UTC (rev 2991)
+++ trunk/joafip-parent/pom.xml 2012-03-03 02:24:47 UTC (rev 2992)
@@ -349,6 +349,7 @@
<module>../joafip-rbtree</module>
<module>../joafip-collection</module>
<module>../joafip-heapfile</module>
+ <module>../joafip-pmap</module>
<module>../joafip-callback</module>
<module>../joafip-java-agent</module>
<module>../joafip-meminspector</module>
Property changes on: trunk/joafip-pmap
___________________________________________________________________
Added: svn:ignore
+ .settings
.classpath
.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 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)
...
[truncated message content] |
|
From: <luc...@us...> - 2012-03-06 08:44:19
|
Revision: 2993
http://joafip.svn.sourceforge.net/joafip/?rev=2993&view=rev
Author: luc_peuvrier
Date: 2012-03-06 08:44:06 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
file tree map project added
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java
trunk/joafip-collection/src/main/java/net/sf/joafip/java/util/PTreeSubSet.java
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java
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/DataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.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/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/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/AbstractHeapDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AutoSaveHeapFileDataManager.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/service/TestStoreRestore.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.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-pmap/pom.xml
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/entity/IRBTNode.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/entity/RBTSentinel.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/service/RedBlackTree.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/AbstractTestByPosition.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/AbstractTestDelete.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestDeleteDuplicate.java
trunk/joafip-testsuite/pom.xml
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/redblacktree/RedBlackTreeTests.java
Added Paths:
-----------
trunk/joafip/doc/class_comment_header_lgpl.txt
trunk/joafip/doc/licences.txt
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyManager.java
trunk/joafip-pmap/src/main/java/net/
trunk/joafip-pmap/src/main/java/net/sf/
trunk/joafip-pmap/src/main/java/net/sf/joafip/
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMap.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapEntrySet.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapKeyMgr.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapKeySet.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapValues.java
trunk/joafip-pmap/src/test/java/net/
trunk/joafip-pmap/src/test/java/net/sf/
trunk/joafip-pmap/src/test/java/net/sf/joafip/
trunk/joafip-pmap/src/test/java/net/sf/joafip/pmap/
trunk/joafip-pmap/src/test/java/net/sf/joafip/pmap/TestFileTreeMap.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndexMultipleValue.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndexUniqueValue.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/pmap/
trunk/joafip-testsuite/src/main/java/net/sf/joafip/pmap/FileTreeMapTests.java
Removed Paths:
-------------
trunk/joafip/doc/class_comment_header.txt
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndex.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-03-06 08:44:21
|
Revision: 2993
http://joafip.svn.sourceforge.net/joafip/?rev=2993&view=rev
Author: luc_peuvrier
Date: 2012-03-06 08:44:06 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
file tree map project added
Modified Paths:
--------------
trunk/joafip/doc/_todo.txt
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java
trunk/joafip-collection/src/main/java/net/sf/joafip/java/util/PTreeSubSet.java
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java
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/DataRecordKey.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.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/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/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/AbstractHeapDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AutoSaveHeapFileDataManager.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/service/TestStoreRestore.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManager.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-pmap/pom.xml
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/entity/IRBTNode.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/entity/RBTSentinel.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/impl/memory/entity/RBTNode.java
trunk/joafip-rbtree/src/main/java/net/sf/joafip/redblacktree/service/RedBlackTree.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/AbstractTestByPosition.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/AbstractTestDelete.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestDeleteDuplicate.java
trunk/joafip-testsuite/pom.xml
trunk/joafip-testsuite/src/main/java/net/sf/joafip/InErrorTests.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/PersistanceTestsNoLongTests.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/redblacktree/RedBlackTreeTests.java
Added Paths:
-----------
trunk/joafip/doc/class_comment_header_lgpl.txt
trunk/joafip/doc/licences.txt
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyManager.java
trunk/joafip-pmap/src/main/java/net/
trunk/joafip-pmap/src/main/java/net/sf/
trunk/joafip-pmap/src/main/java/net/sf/joafip/
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMap.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapEntrySet.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapKeyMgr.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapKeySet.java
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMapValues.java
trunk/joafip-pmap/src/test/java/net/
trunk/joafip-pmap/src/test/java/net/sf/
trunk/joafip-pmap/src/test/java/net/sf/joafip/
trunk/joafip-pmap/src/test/java/net/sf/joafip/pmap/
trunk/joafip-pmap/src/test/java/net/sf/joafip/pmap/TestFileTreeMap.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndexMultipleValue.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndexUniqueValue.java
trunk/joafip-testsuite/src/main/java/net/sf/joafip/pmap/
trunk/joafip-testsuite/src/main/java/net/sf/joafip/pmap/FileTreeMapTests.java
Removed Paths:
-------------
trunk/joafip/doc/class_comment_header.txt
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/IDataRecordKeyComparator.java
trunk/joafip-rbtree/src/test/java/net/sf/joafip/redblacktree/service/TestIndex.java
Modified: trunk/joafip/doc/_todo.txt
===================================================================
--- trunk/joafip/doc/_todo.txt 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/doc/_todo.txt 2012-03-06 08:44:06 UTC (rev 2993)
@@ -109,6 +109,9 @@
a java agent to change "new Xxx" to call to newInstance proxied object factory for auto save
+sub set/map/list
+- add/check test contains, remove, add must failed if not in range
+
collection apache and google
BlockDataManger
Deleted: trunk/joafip/doc/class_comment_header.txt
===================================================================
--- trunk/joafip/doc/class_comment_header.txt 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/doc/class_comment_header.txt 2012-03-06 08:44:06 UTC (rev 2993)
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
Copied: trunk/joafip/doc/class_comment_header_lgpl.txt (from rev 2989, trunk/joafip/doc/class_comment_header.txt)
===================================================================
--- trunk/joafip/doc/class_comment_header_lgpl.txt (rev 0)
+++ trunk/joafip/doc/class_comment_header_lgpl.txt 2012-03-06 08:44:06 UTC (rev 2993)
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2012 Luc Peuvrier
+ * All rights reserved.
+ *
+ * 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.
+ */
Added: trunk/joafip/doc/licences.txt
===================================================================
--- trunk/joafip/doc/licences.txt (rev 0)
+++ trunk/joafip/doc/licences.txt 2012-03-06 08:44:06 UTC (rev 2993)
@@ -0,0 +1,124 @@
+LGPL:
+-----
+
+/*
+ * Copyright 2012 Luc Peuvrier
+ * All rights reserved.
+ *
+ * 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.
+ */
+
+APACHE:
+-------
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+
+ 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.
+
+A LESS RESTRICTIVE LICENCE (asm objectweb)
+------------------------------------------
+
+/*
+ * Copyright 2012 Luc Peuvrier
+ * All rights reserved.
+ *
+ * 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 "LGPL License");
+ * you may not use this file except in compliance with the "LGPL License" extended with here below additional permissions.
+ * You may obtain a copy of the "LGPL License" at
+ *
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * Additional permissions extensions for this file:
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted under the the Apache License, Version 2.0 (the "Apache License") instead of the "LGPL License"
+ * and if following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * You may obtain a copy of the "Apache License" at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+Copyright (c) 2007-2012 Luc Peuvrier
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+
+
\ No newline at end of file
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -410,6 +410,16 @@
}
@Override
+ public void setIndex(final int index) {
+ node.setIndex(index);
+ }
+
+ @Override
+ public int getIndex() {
+ return node.getIndex();
+ }
+
+ @Override
public void decrementNumberOfChild() throws RBTException {
node.decrementNumberOfChild();
try {
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -128,7 +128,7 @@
if (useCacheMode) {
setup.cacheSetup(pageSize, maxPage);
}
- this.dataManager = new HeapFileDataManager(setup);
+ this.dataManager = new HeapFileDataManager(setup, false);
} catch (HeapException exception) {
logger.fatal(CREATION_FAILED, exception);
throw new StoreException(CREATION_FAILED, exception);
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 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/ExportStoreQue.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -60,7 +60,7 @@
1/* maxFileOperationRetry */, 0/* fileOperationRetryMsDelay */,
null/* openFileTraceFile */);
setup.cacheSetup(1024/* pageSize */, 1024/* maxPage */);
- heapDataManagerForSet = new AutoSaveHeapFileDataManager(setup,
+ heapDataManagerForSet = new AutoSaveHeapFileDataManager(setup, false,
MAX_RECORDS);
minusOne = longToBinary(-1);
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/TestDataManagerHeapFile.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -54,7 +54,7 @@
/**/false/* delete renaming */, false/* clearResizeFile */, 1, 0,
/**/openFileTraceFile);
setup.cacheSetup(16 * 1024, 100);
- dataManager = new HeapFileDataManager(setup);
+ dataManager = new HeapFileDataManager(setup, false);
super.setUp();
}
}
Modified: trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -75,6 +75,7 @@
builder.setCrashSafeMode(false);
filePersistence = (FilePersistence) builder.build();
joafipMutex = filePersistence.getMutex();
+ filePersistence.addToNotCheckMethod(Bob1.class);
}
@Override
Modified: trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java
===================================================================
--- trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -65,7 +65,7 @@
+ "/backup.ok"),
/**/new File(TestConstant.getWinRamDiskRuntimeDir()
+ "/global.ok"));
- dataManager = new HeapFileDataManager(setup);
+ dataManager = new HeapFileDataManager(setup, false);
dataManager.startService(true);
} catch (HeapException exception) {
if (dataManager == null) {
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -61,7 +61,8 @@
false/* clearResizeFile */, 0/* maxFileOperationRetry */,
0/* fileOperationRetryMsDelay */, new File(
"runtime/openFileTraceFile.txt"));
- final IHeapDataManager fileDataManager = new HeapFileDataManager(setup);
+ final IHeapDataManager fileDataManager = new HeapFileDataManager(setup,
+ false);
builder.setDataManager(new DualWrapDataManager(fileDataManager,
blockDataManager));
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -57,7 +57,7 @@
final File dataFile = new File(storageFileName);
final HeapFileSetup setup = new HeapFileSetup(dataFile, false,
false, false, false, 1, 0, null);
- dataManager = new HeapFileDataManager(setup);
+ dataManager = new HeapFileDataManager(setup, false);
final HeapRecordableManager heapRecordableManager = new HeapRecordableManager(
dataManager);
final HelperBinaryConversion helperBinaryConversion = new HelperBinaryConversion();
Modified: trunk/joafip-collection/src/main/java/net/sf/joafip/java/util/PTreeSubSet.java
===================================================================
--- trunk/joafip-collection/src/main/java/net/sf/joafip/java/util/PTreeSubSet.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-collection/src/main/java/net/sf/joafip/java/util/PTreeSubSet.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -134,12 +134,24 @@
}
}
if (outOfRange) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("element out of range");
}
return super.add(element);
}
+ // FIXMELUC ____________must be override
@Override
+ public boolean contains(final Object object) {// NOPMD
+ return super.contains(object);
+ }
+
+ // FIXMELUC ____________must be override
+ @Override
+ public boolean remove(final Object object) {// NOPMD
+ return super.remove(object);
+ }
+
+ @Override
public ListIterator<E> listIterator() {
return treeSupport.iterator(fromElement, fromInclusive, toElement,
toInclusive);
Modified: trunk/joafip-heapfile/pom.xml
===================================================================
--- trunk/joafip-heapfile/pom.xml 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/pom.xml 2012-03-06 08:44:06 UTC (rev 2993)
@@ -35,6 +35,14 @@
<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-file</artifactId>
<version>4.0.0b8</version>
</dependency>
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -16,6 +16,8 @@
*/
package net.sf.joafip.heapfile.entity;
+import java.util.Arrays;
+
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.heapfile.service.FileForStorable;
import net.sf.joafip.heapfile.service.HeapException;
@@ -67,6 +69,8 @@
/** input output buffer */
private transient byte[] ioBuffer;
+ private transient int readInIoBuffer;
+
/**
* true if this value changed, creation implies no value to save since not
* read and not write
@@ -223,12 +227,33 @@
protected int readFileToIoBuffer(final int size) throws HeapException {
ioBuffer = new byte[size];
- final int readInIoBuffer = fileForStorable.read(ioBuffer);
+ readInIoBuffer = fileForStorable.read(ioBuffer);
numberOfByteReadWrote = 0;
return readInIoBuffer;
}
/**
+ * read extending ioBuffer
+ *
+ * @param newSize
+ * ioBuffer new size
+ * @throws HeapException
+ */
+ protected void readFileAppendToIoBuffer(final int newSize)
+ throws HeapException {
+ if (newSize > ioBuffer.length) {
+ ioBuffer = Arrays.copyOf(ioBuffer, newSize);
+ final int appendSize = newSize - readInIoBuffer;
+ final byte[] tempBuffer = new byte[appendSize];
+ // FIXMELUC _________________use of additional read
+ // read(iobuffer,readInIoBuffer/*offset*/,appendSize/*length*/);
+ fileForStorable.read(tempBuffer);
+ System.arraycopy(tempBuffer, 0, ioBuffer, readInIoBuffer,
+ appendSize);
+ }
+ }
+
+ /**
* read and check CRC32
*
* @throws HeapException
Modified: trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -92,6 +92,8 @@
*/
public int numberOfChild = 0;
+ public int index;
+
/**
* heap elements manager for access to {@link HeapRecord}, null for sentinel
* node
@@ -437,6 +439,16 @@
}
@Override
+ public void setIndex(final int index) {
+ this.index = index;
+ }
+
+ @Override
+ public int getIndex() {
+ return index;
+ }
+
+ @Override
public void decrementNumberOfChild() throws RBTException {
numberOfChild--;
heapRecordValueIsChanged(true);
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-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordIdentifier.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -45,6 +45,8 @@
private final IDataRecordKey dataRecordKey;
+ private int index;
+
/**
* create the first data record identifier: #0
*
@@ -114,6 +116,18 @@
return dataRecordKey.getKeyData();
}
+ public Object getKey() throws HeapException {
+ return dataRecordKey.getKey();
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(final int index) {
+ this.index = index;
+ }
+
public int compareTo(final DataRecordIdentifier dataRecordIdentifier) {
final int compareTo;
final long otherLong1 = dataRecordIdentifier.value;
Modified: 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 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/DataRecordKey.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -23,7 +23,7 @@
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.record.service.IDataRecordKeyManager;
import net.sf.joafip.heapfile.service.HeapException;
/**
@@ -34,16 +34,16 @@
@NotStorableClass
public class DataRecordKey implements IDataRecordKey {
- private final IDataRecordKeyComparator comparator;
+ private final IDataRecordKeyManager dataRecordKeyManager;
private final byte[] data;
private transient Object key;
- public DataRecordKey(final IDataRecordKeyComparator comparator,
+ public DataRecordKey(final IDataRecordKeyManager dataRecordKeyManager,
final byte[] data) {// NOPMD
super();
- this.comparator = comparator;
+ this.dataRecordKeyManager = dataRecordKeyManager;
this.data = data;
}
@@ -55,7 +55,7 @@
@Override
public int compareTo(final IDataRecordKey dataRecordKey)
throws HeapException {
- return comparator.compareDataRecordKey(this, dataRecordKey);
+ return dataRecordKeyManager.compareDataRecordKey(this, dataRecordKey);
}
@Override
@@ -69,11 +69,13 @@
}
@Override
- public Object getKey() {
+ public Object getKey() throws HeapException {
+ if (key == null) {
+ key = dataRecordKeyManager.unmarshall(data);
+ }
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/HeapIdNode.java
===================================================================
--- trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.java 2012-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -59,6 +59,7 @@
}
public DataRecordIdentifier getElement() {
+ nodeIdentifier.setIndex(index);
return nodeIdentifier;
}
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-03-03 02:24:47 UTC (rev 2992)
+++ trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapRecord.java 2012-03-06 08:44:06 UTC (rev 2993)
@@ -92,9 +92,10 @@
/**/COMMON_FOR_HEADER_SIZE + 4 + 3 * 8 + 1 + 4 + 8;
@SuppressWarnings("all")
+ // add 4 to DATA_RECORD_HEADER_SIZE for key data length storage
public static final int MAX_RECORD_HEADER_SIZE =
- /**/DATA_RECORD_HEADER_SIZE > FREE_RECORD_HEADER_SIZE ?
- /**/DATA_RECORD_HEADER_SIZE
+ /**/(DATA_RECORD_HEADER_SIZE + 4) > FREE_RECORD_HEADER_SIZE ?
+ /**/(DATA_RECORD_HEADER_SIZE + 4)
/**/: FREE_RECORD_HEADER_SIZE;
/**
@@ -131,6 +132,8 @@
/** the area size in file ( record header size + data size ) */
private Integer areaSize;
+ private int dataRecordHeaderSize;
+
/** data size of data associated to this record, null if free data area */
private Integer dataAssociatedSize;
@@ -189,13 +192,6 @@
assert assertAreaSizeForData(freeRecord, nodeIdentifier,
dataAssociatedSize, areaSize);
this.areaSize = areaSize;
- // if (freeRecord) {
- // freeNode = new HeapFreeNode(heapElementManager, positionInFile,
- // areaSize);
- // } else {
- // idNode = new HeapIdNode(heapElementManager, positionInFile,
- // nodeIdentifier);
- // }
this.nodeIdentifier = nodeIdentifier;
clearNodeData();
// ASSERTX
@@ -206,9 +202,11 @@
final DataRecordIde...
[truncated message content] |
|
From: <luc...@us...> - 2012-04-08 03:03:42
|
Revision: 2996
http://joafip.svn.sourceforge.net/joafip/?rev=2996&view=rev
Author: luc_peuvrier
Date: 2012-04-08 03:03:31 +0000 (Sun, 08 Apr 2012)
Log Message:
-----------
kvstore sub project intoduced to enable new implementation of data manager based on key value storage
Modified Paths:
--------------
trunk/joafip/pom.xml
trunk/joafip/src/main/java/net/sf/joafip/entity/FilePersistenceProperties.java
trunk/joafip/src/main/java/net/sf/joafip/service/AbstractFilePersistenceDelegatingToStore.java
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistenceBuilder.java
trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreHeader.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreProperties.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/export_import/in/ObjectModelForImport.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/DataRecordIdentifierRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/GarbageReferenceLinkRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferenceLink.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferenceLinkGarbageException.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/Referencing.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferencingReferencedKey.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordable.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/IHeapRecordable.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ClassNameRecord.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectClassInfoAndDeclared.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectLinkTreeNode.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/entity/saver/StoreSaverSession.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/Store.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/AbstractConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/NullableAndTypedReferenceConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/ReferenceConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractCurrentHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractInFieldInArrayHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InObjectHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InObjectsHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InStaticFieldHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/AbstractExporter.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/export_import/out/StoreAccessForExport.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/XmlExporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/GarbageManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/IGarbageManagerForCollect.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/IGarbageManagerForLinkUpdate.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/LinkManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/StoreGarbager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/AbstractDataRecordIdentifierRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/AbstractGarbageRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/GarbageCandidateRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/GarbageReferenceLinkRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/ToGarbageRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/ToVisitRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/VisitedRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/GarbageCandidateRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/LinkRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/ToGarbageRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/ToVisitRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/VisitedRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/heaprecordable/HeapRecordableManager.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/ClassNameManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/HeaderReader.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IClassNameManager.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/IObjectIOManagerForProxyObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIoManagerForGarbage.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/ObjectIODummy.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractImmediateObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputGeneric.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputImmediate.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputLazy.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/BasicOrReferenceInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/IObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForArray.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForBasic.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForEnum.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForString.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerialize.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerializeGZipped.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerializeZipped.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ReferenceInput.java
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/proxy/IProxyManagerForObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/SerializerProxyManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/saver/ForSaveLinkManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/saver/StoreSaver3.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java
trunk/joafip/src/test/java/net/sf/joafip/service/Bob1ObjectInputForTestCustom.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestCrashSafe.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestMultipleFilePersistenceInstance.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/savenum/TestEnumPersistenceMemory.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestSubstitutionWithMethodInterception.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestExclusiveDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/garbage/ReferenceLinkEntry.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/garbage/ReferenceLinkGraph.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/objectio/manager/WriteResult.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractGarbageTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestLinkManagement.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestObjectReferenceLink.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStore.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStoreForPersistenteClass.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStoreWithBob.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/ForTestObjectInput.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreVisitedModified.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/binary/TestReferenceConverter.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/binary/TestReferenceNullableConverter.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/TestPersistableCodeGeneratorInStore.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/GarbageDataIntegrityChecker.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/GarbageManagerForLinkUpdateMock.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestLinkManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestReferenceLinkGraph.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestStoreGarbager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/AbstractGarbageManagerTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestGarbageCandidateRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestLinkRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestToGarbageRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/heaprecordable/TestHeapRecordableManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/TestClassNameManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractBinaryDump.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/manager/ClassNameManagerMock.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/TestObjectIOManagerGenericCases.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/TestObjectIOManagerSerializeCase.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/objectio/serialize/ObjectIOBasicTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/AbstractObjectIoManagerForProxyTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyAutoSave.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreation.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptPackageVisibility.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptPrivate.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptProtected.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractInserter.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractPerfService.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/ExporterBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/InserterBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/SearcherBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/AbstractCrash.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/MainCrash.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java
trunk/joafip-example-hugemap/src/main/java/net/sf/joafip/hugemap/AbstractPersistence.java
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/DataAndDataRecordIdentifier.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/HeapFileSetup.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/IFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java
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/HeapFreeNode.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapHeader.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.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/AbstractDataRecordKeyComparator.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractHeapNodeManager.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/HeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapFreeNodeManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapIdNodeManager.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/AbstractFileFor.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AbstractHeapDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AutoSaveHeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/FileForStorable.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/HeapFileState.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IFileForStorable.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.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/entity/TestAbstractFileStorable.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/entity/TestDataRecordIdentifier.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/entity/TestMarshall.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestHeapElementManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestHeapRecordManage.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/AbstractTestHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerRecord.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/FileDataManagerIntegrityChecker.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/FileForStorableBridge.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-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapRecordIterator.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestBlockDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerBackup.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java
trunk/joafip-parent/pom.xml
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMap.java
Added Paths:
-----------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/entity/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/entity/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/service/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/service/
trunk/joafip-kvstore/.classpath
trunk/joafip-kvstore/.pmd
trunk/joafip-kvstore/.project
trunk/joafip-kvstore/.ruleset
trunk/joafip-kvstore/.settings/
trunk/joafip-kvstore/.settings/org.eclipse.core.resources.prefs
trunk/joafip-kvstore/.settings/org.eclipse.jdt.core.prefs
trunk/joafip-kvstore/.settings/org.eclipse.m2e.core.prefs
trunk/joafip-kvstore/pom.xml
trunk/joafip-kvstore/src/
trunk/joafip-kvstore/src/main/
trunk/joafip-kvstore/src/main/java/
trunk/joafip-kvstore/src/main/java/net/
trunk/joafip-kvstore/src/main/java/net/sf/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/entity/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/entity/EnumFileState.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/DataRecordIdentifier.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/IDataRecordKey.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/NullDataRecordKey.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/service/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/service/IDataRecordKeyManager.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/HeapException.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/HeapRuntimeException.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/IHeapDataManager.java
trunk/joafip-kvstore/src/main/resources/
trunk/joafip-kvstore/src/test/
trunk/joafip-kvstore/src/test/java/
trunk/joafip-kvstore/src/test/resources/
Removed Paths:
-------------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/EnumFileState.java
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/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/IDataRecordKeyManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapException.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapRuntimeException.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <luc...@us...> - 2012-04-08 03:03:44
|
Revision: 2996
http://joafip.svn.sourceforge.net/joafip/?rev=2996&view=rev
Author: luc_peuvrier
Date: 2012-04-08 03:03:31 +0000 (Sun, 08 Apr 2012)
Log Message:
-----------
kvstore sub project intoduced to enable new implementation of data manager based on key value storage
Modified Paths:
--------------
trunk/joafip/pom.xml
trunk/joafip/src/main/java/net/sf/joafip/entity/FilePersistenceProperties.java
trunk/joafip/src/main/java/net/sf/joafip/service/AbstractFilePersistenceDelegatingToStore.java
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistenceBuilder.java
trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreHeader.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreProperties.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/export_import/in/ObjectModelForImport.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/DataRecordIdentifierRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/GarbageReferenceLinkRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferenceLink.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferenceLinkGarbageException.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/Referencing.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/garbage/ReferencingReferencedKey.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordable.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/AbstractHeapRecordableRBTNode.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/heaprecordable/IHeapRecordable.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ClassNameRecord.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectClassInfoAndDeclared.java
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectLinkTreeNode.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/entity/saver/StoreSaverSession.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractDelegatingToStoreManagers.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/AbstractStoreDelegatingToDataManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/IStore.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/Store.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/AbstractConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/NullableAndTypedReferenceConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/binary/ReferenceConverter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractCurrentHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractImporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/AbstractInFieldInArrayHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InObjectHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InObjectsHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/in/InStaticFieldHandler.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/AbstractExporter.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/export_import/out/StoreAccessForExport.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/export_import/out/XmlExporter.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/GarbageManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/IGarbageManagerForCollect.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/IGarbageManagerForLinkUpdate.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/LinkManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/StoreGarbager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/AbstractDataRecordIdentifierRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/AbstractGarbageRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/GarbageCandidateRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/GarbageReferenceLinkRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/ToGarbageRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/ToVisitRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/rbt/VisitedRBTNodeManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/GarbageCandidateRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/LinkRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/ToGarbageRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/ToVisitRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/garbage/recordmgr/VisitedRecordManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/heaprecordable/HeapRecordableManager.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/ClassNameManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/HeaderReader.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IClassNameManager.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/IObjectIOManagerForProxyObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/manager/IObjectIoManagerForGarbage.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/ObjectIODummy.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractImmediateObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputGeneric.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputImmediate.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/AbstractObjectInputLazy.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/BasicOrReferenceInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/IObjectInput.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForArray.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForBasic.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForEnum.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputForString.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerialize.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerializeGZipped.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ObjectInputSerializeZipped.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/objectio/serialize/input/ReferenceInput.java
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/proxy/IProxyManagerForObjectIO.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/SerializerProxyManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/saver/ForSaveLinkManager.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/saver/StoreSaver3.java
trunk/joafip/src/test/java/net/sf/joafip/service/AbstractTestCustomDataManager.java
trunk/joafip/src/test/java/net/sf/joafip/service/Bob1ObjectInputForTestCustom.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestCrashSafe.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestExportImport.java
trunk/joafip/src/test/java/net/sf/joafip/service/TestMultipleFilePersistenceInstance.java
trunk/joafip/src/test/java/net/sf/joafip/service/bug/savenum/TestEnumPersistenceMemory.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/AbstractTestSubstitutionWithMethodInterception.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel300/TestExclusiveDataAccessSession.java
trunk/joafip/src/test/java/net/sf/joafip/service/rel400/TestRuntime310Garbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/garbage/ReferenceLinkEntry.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/garbage/ReferenceLinkGraph.java
trunk/joafip/src/test/java/net/sf/joafip/store/entity/objectio/manager/WriteResult.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractDataManagerTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractGarbageTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestLinkManagement.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestNoGarbage.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestObjectReferenceLink.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStore.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStoreForPersistenteClass.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/AbstractTestStoreWithBob.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/ForTestObjectInput.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/StoreForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/TestStoreVisitedModified.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/binary/TestReferenceConverter.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/binary/TestReferenceNullableConverter.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/bytecode/TestPersistableCodeGeneratorInStore.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/copier/AbstractTestDeepCopier.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/GarbageDataIntegrityChecker.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/GarbageManagerForLinkUpdateMock.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestLinkManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestReferenceLinkGraph.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/TestStoreGarbager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/AbstractGarbageManagerTestCase.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestGarbageCandidateRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestLinkRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/garbage/recordmgr/TestToGarbageRecordManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/heaprecordable/TestHeapRecordableManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/TestClassNameManager.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/AbstractBinaryDump.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/manager/ClassNameManagerMock.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/TestObjectIOManagerGenericCases.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/objectio/manager/TestObjectIOManagerSerializeCase.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/objectio/serialize/ObjectIOBasicTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/AbstractObjectIoManagerForProxyTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/ProxyCallBackForTest.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyAutoSave.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreation.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyCreationConstructed.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyFieldReflect.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptPackageVisibility.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptPrivate.java
trunk/joafip/src/test/java/net/sf/joafip/store/service/proxy/TestProxyInterceptProtected.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeBlockFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeDual.java
trunk/joafip-4test/src/main/java/net/sf/joafip/bugtree/MainTreeMultiFile.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractInserter.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractPerfService.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/AbstractSearcher.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/ExporterBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/InserterBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/performance/items/service/SearcherBKM.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/AbstractCrash.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/MainCrash.java
trunk/joafip-4test/src/main/java/net/sf/joafip/service/changelog/CheckSaved.java
trunk/joafip-example-hugemap/src/main/java/net/sf/joafip/hugemap/AbstractPersistence.java
trunk/joafip-heapfile/pom.xml
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/AbstractFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/DataAndDataRecordIdentifier.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/HeapFileSetup.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/IFileStorable.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/AbstractHeapRBTNode.java
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/HeapFreeNode.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapHeader.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/entity/HeapIdNode.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/AbstractDataRecordKeyComparator.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/AbstractHeapNodeManager.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/HeapElementManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapFreeNodeManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/record/service/HeapIdNodeManager.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/AbstractFileFor.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AbstractHeapDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/AutoSaveHeapFileDataManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/FileForStorable.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/HeapFileState.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IFileForStorable.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/entity/BlockDataManagerHeader.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/entity/TestAbstractFileStorable.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/entity/TestDataRecordIdentifier.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/entity/TestMarshall.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestHeapElementManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/record/service/TestHeapRecordManage.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/AbstractTestHeapDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerImpl.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/AbstractTestHeapDataManagerRecord.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/FileDataManagerIntegrityChecker.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/FileForStorableBridge.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-heapfile/src/test/java/net/sf/joafip/heapfile/service/HeapRecordIterator.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestBlockDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManager.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerBackup.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataManagerFreeing.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrMemoryLeak.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithKey.java
trunk/joafip-heapfile/src/test/java/net/sf/joafip/heapfile/service/TestHeapFileDataMgrWithScenario.java
trunk/joafip-parent/pom.xml
trunk/joafip-pmap/src/main/java/net/sf/joafip/pmap/FileTreeMap.java
Added Paths:
-----------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/entity/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/entity/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/record/service/
trunk/joafip-heapfile/src/main/java/net/sf/joafip/kvstore/service/
trunk/joafip-kvstore/.classpath
trunk/joafip-kvstore/.pmd
trunk/joafip-kvstore/.project
trunk/joafip-kvstore/.ruleset
trunk/joafip-kvstore/.settings/
trunk/joafip-kvstore/.settings/org.eclipse.core.resources.prefs
trunk/joafip-kvstore/.settings/org.eclipse.jdt.core.prefs
trunk/joafip-kvstore/.settings/org.eclipse.m2e.core.prefs
trunk/joafip-kvstore/pom.xml
trunk/joafip-kvstore/src/
trunk/joafip-kvstore/src/main/
trunk/joafip-kvstore/src/main/java/
trunk/joafip-kvstore/src/main/java/net/
trunk/joafip-kvstore/src/main/java/net/sf/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/entity/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/entity/EnumFileState.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/DataRecordIdentifier.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/IDataRecordKey.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/entity/NullDataRecordKey.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/service/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/record/service/IDataRecordKeyManager.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/HeapException.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/HeapRuntimeException.java
trunk/joafip-kvstore/src/main/java/net/sf/joafip/kvstore/service/IHeapDataManager.java
trunk/joafip-kvstore/src/main/resources/
trunk/joafip-kvstore/src/test/
trunk/joafip-kvstore/src/test/java/
trunk/joafip-kvstore/src/test/resources/
Removed Paths:
-------------
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/entity/EnumFileState.java
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/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/IDataRecordKeyManager.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapException.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/HeapRuntimeException.java
trunk/joafip-heapfile/src/main/java/net/sf/joafip/heapfile/service/IHeapDataManager.java
Modified: trunk/joafip/pom.xml
===================================================================
--- trunk/joafip/pom.xml 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/pom.xml 2012-04-08 03:03:31 UTC (rev 2996)
@@ -39,6 +39,12 @@
<dependency>
<groupId>net.sf.joafip</groupId>
+ <artifactId>joafip-kvstore</artifactId>
+ <version>4.0.0b8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.joafip</groupId>
<artifactId>joafip-heapfile</artifactId>
<version>4.0.0b8</version>
</dependency>
Modified: trunk/joafip/src/main/java/net/sf/joafip/entity/FilePersistenceProperties.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/entity/FilePersistenceProperties.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/entity/FilePersistenceProperties.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -23,7 +23,7 @@
import java.util.TreeSet;
import net.sf.joafip.NotStorableClass;
-import net.sf.joafip.heapfile.service.IHeapDataManager;
+import net.sf.joafip.kvstore.service.IHeapDataManager;
import net.sf.joafip.store.entity.StoreProperties;
import net.sf.joafip.store.service.conversion.def.InputStreamAndSource;
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/AbstractFilePersistenceDelegatingToStore.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/AbstractFilePersistenceDelegatingToStore.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/AbstractFilePersistenceDelegatingToStore.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -29,8 +29,8 @@
import net.sf.joafip.NoStorableAccess;
import net.sf.joafip.NotStorableClass;
import net.sf.joafip.entity.MutableInteger;
-import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
-import net.sf.joafip.heapfile.service.IHeapDataManager;
+import net.sf.joafip.kvstore.record.entity.DataRecordIdentifier;
+import net.sf.joafip.kvstore.service.IHeapDataManager;
import net.sf.joafip.logger.JoafipLogger;
import net.sf.joafip.store.entity.EnumKey;
import net.sf.joafip.store.entity.classinfo.ClassInfo;
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistence.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -37,11 +37,11 @@
import net.sf.joafip.entity.FilePersistenceProperties;
import net.sf.joafip.entity.FilePersistencePropertyEntry;
import net.sf.joafip.file.service.FileIOException;
-import net.sf.joafip.heapfile.entity.EnumFileState;
-import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
import net.sf.joafip.heapfile.service.HeapFileState;
-import net.sf.joafip.heapfile.service.IHeapDataManager;
import net.sf.joafip.java.util.PTreeMap;
+import net.sf.joafip.kvstore.entity.EnumFileState;
+import net.sf.joafip.kvstore.record.entity.DataRecordIdentifier;
+import net.sf.joafip.kvstore.service.IHeapDataManager;
import net.sf.joafip.logger.JoafipLogger;
import net.sf.joafip.reflect.ExceptionOfTarget;
import net.sf.joafip.reflect.HelperReflect;
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistenceBuilder.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistenceBuilder.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/FilePersistenceBuilder.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -25,7 +25,7 @@
import net.sf.joafip.NoStorableAccess;
import net.sf.joafip.entity.EnumNoMoreDataAction;
import net.sf.joafip.entity.FilePersistenceProperties;
-import net.sf.joafip.heapfile.service.IHeapDataManager;
+import net.sf.joafip.kvstore.service.IHeapDataManager;
import net.sf.joafip.store.service.conversion.def.InputStreamAndSource;
/**
Modified: trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/service/IFilePersistence.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -29,7 +29,7 @@
import net.sf.joafip.StorableClass;
import net.sf.joafip.StoreSerializeAndZippedInOneRecord;
import net.sf.joafip.entity.MutableInteger;
-import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.kvstore.record.entity.DataRecordIdentifier;
import net.sf.joafip.store.entity.classinfo.ClassInfo;
import net.sf.joafip.store.service.IGarbageListener;
import net.sf.joafip.store.service.export_import.in.IImportListener;
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreHeader.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreHeader.java 2012-04-08 02:50:43 UTC (rev 2995)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreHeader.java 2012-04-08 03:03:31 UTC (rev 2996)
@@ -17,7 +17,7 @@
package net.sf.joafip.store.entity;
import net.sf.joafip.NotStorableClass;
-import net.sf.joafip.heapfile.record.entity.DataRecordIdentifier;
+import net.sf.joafip.kvstore.record.entity.DataRecordIdentifier;
import net.sf.joafip.store.entity.garbage.EnumGarbageCollectorState;
import net.sf.joafip.store.entity.heaprecordable.AbstractHeapRecordable;
import net.sf.joafip.store.service.StoreException;
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreProperties.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/StoreProperties.java 2012-04-08 02:50:43 UTC (rev 2995)
++...
[truncated message content] |