├── tech-debt.txt ├── ha ├── etc │ ├── hadb │ │ ├── tm_tx_log.1 │ │ ├── neostore.id │ │ ├── active_tx_log │ │ ├── nioneo_logical.log.active │ │ ├── neostore.nodestore.db.id │ │ ├── neostore.propertystore.db.id │ │ ├── neostore.relationshipstore.db.id │ │ ├── neostore.propertystore.db │ │ ├── neostore.propertystore.db.arrays.id │ │ ├── neostore.propertystore.db.index.id │ │ ├── neostore.propertystore.db.strings.id │ │ ├── neostore.relationshiptypestore.db.id │ │ ├── neostore.propertystore.db.index │ │ ├── neostore.propertystore.db.index.keys.id │ │ ├── neostore.relationshiptypestore.db.names.id │ │ ├── neostore.relationshipstore.db │ │ ├── neostore.relationshiptypestore.db │ │ ├── neostore │ │ ├── neostore.propertystore.db.index.keys │ │ ├── neostore.nodestore.db │ │ ├── neostore.relationshiptypestore.db.names │ │ ├── neostore.propertystore.db.arrays │ │ └── neostore.propertystore.db.strings │ └── zkserver.cfg ├── README.txt ├── bin │ ├── zkdevcluster.sh │ ├── hadevcluster.sh │ └── startzk.sh ├── src │ ├── docs │ │ └── dev │ │ │ ├── images │ │ │ ├── ha1.png │ │ │ ├── ha2.png │ │ │ └── ha3.png │ │ │ ├── index.txt │ │ │ └── architecture.txt │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ ├── org.neo4j.backup.BackupExtensionService │ │ │ │ └── org.neo4j.jmx.impl.ManagementBeanProvider │ │ ├── script │ │ │ ├── bootstrap.sh │ │ │ ├── shutdown.sh │ │ │ └── zkdevcluster.sh │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── kernel │ │ │ └── ha │ │ │ ├── BrokerFactory.java │ │ │ ├── zookeeper │ │ │ ├── ZooKeeperTimedOutException.java │ │ │ └── ZooKeeperException.java │ │ │ ├── LockStatus.java │ │ │ ├── MasterIdGeneratorFactory.java │ │ │ ├── ResponseReceiver.java │ │ │ └── ZooKeeperLastCommittedTxIdSetter.java │ ├── site │ │ └── apt │ │ │ └── index.apt │ └── test │ │ └── java │ │ ├── slavetest │ │ ├── Fetcher.java │ │ ├── Job.java │ │ └── DoubleLatch.java │ │ └── org │ │ └── neo4j │ │ └── ha │ │ └── CreateEmptyDb.java ├── osgi.bnd ├── build.gradle ├── COPYRIGHT.txt └── NOTICE.txt ├── com ├── README.txt ├── build.gradle ├── CHANGES.txt ├── COPYRIGHT.txt └── src │ ├── test │ └── java │ │ └── org │ │ └── neo4j │ │ └── com │ │ ├── ServerInterface.java │ │ ├── MadeUpWriter.java │ │ └── MadeUpCommunicationInterface.java │ └── main │ └── java │ └── org │ └── neo4j │ └── com │ ├── RequestType.java │ ├── MasterCaller.java │ ├── ObjectSerializer.java │ ├── Serializer.java │ ├── Deserializer.java │ ├── FailedResponse.java │ ├── ComException.java │ └── StoreWriter.java ├── udc ├── osgi.bnd ├── src │ ├── main │ │ ├── assembly │ │ │ ├── forNeo4j.properties │ │ │ └── forMavenCentral.properties │ │ ├── filtered-resources │ │ │ └── org │ │ │ │ └── neo4j │ │ │ │ └── ext │ │ │ │ └── udc │ │ │ │ └── udc.properties │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── org.neo4j.kernel.KernelExtension │ ├── test │ │ ├── resources │ │ │ └── org │ │ │ │ └── neo4j │ │ │ │ └── ext │ │ │ │ └── udc │ │ │ │ └── udc.properties │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── ext │ │ │ └── udc │ │ │ └── impl │ │ │ └── TestUdcExtensionImpl.java │ └── site │ │ └── apt │ │ └── index.apt ├── readme.md ├── NOTICE.txt ├── build.gradle ├── COPYRIGHT.txt ├── tech-debt.txt └── CHANGES.txt ├── graph-algo ├── build.gradle ├── src │ ├── main │ │ ├── model │ │ │ └── model.PNG │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── graphalgo │ │ │ ├── impl │ │ │ ├── centrality │ │ │ │ └── package-info.java │ │ │ ├── util │ │ │ │ ├── IntegerComparator.java │ │ │ │ ├── DoubleAdder.java │ │ │ │ ├── IntegerAdder.java │ │ │ │ └── DoubleComparator.java │ │ │ ├── shortestpath │ │ │ │ └── package-info.java │ │ │ └── path │ │ │ │ └── AllSimplePaths.java │ │ │ ├── package-info.java │ │ │ ├── WeightedPath.java │ │ │ └── MaxCostEvaluator.java │ ├── docs │ │ └── dev │ │ │ └── images │ │ │ └── graphalgo-astar.png │ ├── site │ │ └── apt │ │ │ └── index.apt │ └── test │ │ └── java │ │ └── common │ │ └── GraphDefinition.java ├── NOTICE.txt ├── osgi.bnd └── COPYRIGHT.txt ├── integration-test ├── integration │ ├── osgi │ │ ├── src │ │ │ └── main │ │ │ │ ├── resources │ │ │ │ └── readme.txt │ │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── neo4j │ │ │ │ └── release │ │ │ │ └── tests │ │ │ │ └── osgi │ │ │ │ └── ExampleService.java │ │ └── osgi.bnd │ ├── poja │ │ ├── src │ │ │ └── main │ │ │ │ ├── resources │ │ │ │ └── readme.txt │ │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── neo4j │ │ │ │ └── release │ │ │ │ └── it │ │ │ │ └── poja │ │ │ │ └── ExampleService.java │ │ └── osgi.bnd │ ├── standard │ │ ├── src │ │ │ └── test │ │ │ │ ├── resources │ │ │ │ └── readme.txt │ │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── neo4j │ │ │ │ │ └── release │ │ │ │ │ └── it │ │ │ │ │ └── std │ │ │ │ │ └── exec │ │ │ │ │ └── HelloWorldApp.java │ │ │ │ └── scala │ │ │ │ └── org │ │ │ │ └── neo4j │ │ │ │ └── release │ │ │ │ └── it │ │ │ │ └── std │ │ │ │ └── smoke │ │ │ │ └── SanitySpec.scala │ │ └── pom.xml │ ├── readme.md │ └── pom.xml ├── build.gradle ├── include │ ├── readme.md │ ├── neo4j-superset │ │ ├── readme.md │ │ └── pom.xml │ └── pom.xml └── readme.md ├── wrapper ├── gradle-wrapper.jar └── gradle-wrapper.properties ├── jmx ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ ├── org.neo4j.kernel.KernelExtension │ │ │ │ └── org.neo4j.jmx.impl.ManagementBeanProvider │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── jmx │ │ │ ├── package-info.java │ │ │ └── ManagementInterface.java │ └── test │ │ └── java │ │ └── org │ │ └── neo4j │ │ └── jmx │ │ └── impl │ │ └── TestJmxExtension.java ├── README.txt ├── NOTICE.txt ├── COPYRIGHT.txt └── CHANGES.txt ├── kernel ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ ├── org.neo4j.kernel.Version │ │ │ │ ├── org.neo4j.kernel.KernelExtension │ │ │ │ ├── org.neo4j.kernel.impl.transaction.TransactionManagerProvider │ │ │ │ └── org.neo4j.kernel.impl.management.ManagementBeanProvider │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ ├── graphdb │ │ │ ├── event │ │ │ │ ├── package-info.java │ │ │ │ └── ErrorState.java │ │ │ ├── traversal │ │ │ │ ├── package-info.java │ │ │ │ └── UniquenessFactory.java │ │ │ ├── package-info.java │ │ │ ├── index │ │ │ │ └── package-info.java │ │ │ └── TransactionFailureException.java │ │ │ ├── kernel │ │ │ ├── impl │ │ │ │ ├── transaction │ │ │ │ │ ├── TransactionIdFactory.java │ │ │ │ │ ├── LockType.java │ │ │ │ │ ├── TxFinishHook.java │ │ │ │ │ ├── xaframework │ │ │ │ │ │ ├── XaResource.java │ │ │ │ │ │ ├── LogBufferFactory.java │ │ │ │ │ │ ├── ReadPastEndException.java │ │ │ │ │ │ └── TxIdGeneratorFactory.java │ │ │ │ │ └── LockException.java │ │ │ │ ├── core │ │ │ │ │ ├── LastCommittedTxIdSetter.java │ │ │ │ │ ├── ReadOnlyDbException.java │ │ │ │ │ ├── RelationshipTypeCreator.java │ │ │ │ │ └── PropertyEventData.java │ │ │ │ ├── cache │ │ │ │ │ ├── ReferenceCache.java │ │ │ │ │ ├── SoftReferenceQueue.java │ │ │ │ │ ├── WeakReferenceQueue.java │ │ │ │ │ ├── SoftValue.java │ │ │ │ │ └── WeakValue.java │ │ │ │ ├── nioneo │ │ │ │ │ ├── store │ │ │ │ │ │ ├── IllegalStoreVersionException.java │ │ │ │ │ │ ├── OperationType.java │ │ │ │ │ │ ├── MappedMemException.java │ │ │ │ │ │ ├── IdGenerator.java │ │ │ │ │ │ ├── FileSystemAbstraction.java │ │ │ │ │ │ ├── PlainPersistenceWindow.java │ │ │ │ │ │ ├── DirectPersistenceWindow.java │ │ │ │ │ │ ├── StoreFailureException.java │ │ │ │ │ │ ├── InvalidRecordException.java │ │ │ │ │ │ ├── RelationshipTypeData.java │ │ │ │ │ │ ├── PropertyIndexData.java │ │ │ │ │ │ ├── UnderlyingStorageException.java │ │ │ │ │ │ └── InvalidIdGeneratorException.java │ │ │ │ │ └── xa │ │ │ │ │ │ └── PropertyIndexEventConsumer.java │ │ │ │ └── persistence │ │ │ │ │ ├── EntityIdGenerator.java │ │ │ │ │ └── ResourceAcquisitionFailedException.java │ │ │ ├── package-info.java │ │ │ ├── LockManagerFactory.java │ │ │ ├── DeadlockDetectedException.java │ │ │ ├── NotUnique.java │ │ │ └── IdGeneratorFactory.java │ │ │ └── helpers │ │ │ ├── collection │ │ │ ├── ClosableIterable.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── Predicate.java │ ├── test │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── org.neo4j.kernel.KernelExtension │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ ├── kernel │ │ │ ├── impl │ │ │ │ ├── MyRelTypes.java │ │ │ │ └── traversal │ │ │ │ │ └── GraphDefinition.java │ │ │ ├── TestVersion.java │ │ │ └── OtherExtension.java │ │ │ └── test │ │ │ └── TargetDirectoryTest.java │ ├── site │ │ └── apt │ │ │ └── index.apt │ └── docs │ │ └── ops │ │ ├── index.txt │ │ ├── introduction.txt │ │ └── short-strings.txt ├── build.gradle ├── NOTICE.txt ├── README.txt ├── README.sources.txt ├── COPYRIGHT.txt ├── osgi.bnd ├── tech-debt.txt └── design-discussions.txt ├── backup ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── org.neo4j.kernel.KernelExtension │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── backup │ │ │ └── TheBackupInterface.java │ └── test │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── org.neo4j.backup.BackupExtensionService │ │ └── java │ │ └── org │ │ └── neo4j │ │ └── backup │ │ ├── ServerInterface.java │ │ └── TestExtensions.java ├── CHANGES.txt ├── COPYRIGHT.txt └── NOTICE.txt ├── management ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ ├── com.sun.tools.jconsole.JConsolePlugin │ │ │ │ ├── org.neo4j.jmx.impl.ManagementSupport │ │ │ │ └── org.neo4j.jmx.impl.ManagementBeanProvider │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── management │ │ │ ├── package-info.java │ │ │ ├── impl │ │ │ └── jconsole │ │ │ │ └── UpdateEvent.java │ │ │ ├── RemoteConnection.java │ │ │ ├── XaManager.java │ │ │ └── MemoryMapping.java │ ├── docs │ │ └── ops │ │ │ └── images │ │ │ ├── jconsole_beans.png │ │ │ └── jconsole_connect.png │ └── site │ │ └── apt │ │ └── index.apt ├── CHANGES.txt ├── README.txt ├── NOTICE.txt └── COPYRIGHT.txt ├── lucene-index ├── src │ ├── main │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── services │ │ │ │ └── org.neo4j.graphdb.index.IndexProvider │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── index │ │ │ ├── impl │ │ │ └── lucene │ │ │ │ ├── EntityType.java │ │ │ │ └── package-info.java │ │ │ └── lucene │ │ │ └── package-info.java │ ├── docs │ │ └── dev │ │ │ └── images │ │ │ └── indexing-imdb-example.png │ ├── test │ │ ├── resources │ │ │ └── old-index.db │ │ └── java │ │ │ └── org │ │ │ └── neo4j │ │ │ └── index │ │ │ └── impl │ │ │ └── lucene │ │ │ ├── Command.java │ │ │ ├── DieCommand.java │ │ │ ├── DeleteIndexCommand.java │ │ │ ├── CommitCommand.java │ │ │ ├── BeginTransactionCommand.java │ │ │ ├── RollbackCommand.java │ │ │ └── RemoveFromIndexCommand.java │ └── site │ │ └── apt │ │ └── index.apt ├── osgi.bnd ├── NOTICE.txt ├── build.gradle ├── tech-debt.txt └── COPYRIGHT.txt ├── .gitignore ├── settings.gradle ├── README.txt ├── neo4j ├── build.gradle ├── src │ ├── main │ │ ├── resources │ │ │ └── pom.xml │ │ └── assembly │ │ │ └── assembly.xml │ └── site │ │ └── apt │ │ └── index.apt └── NOTICE.txt └── NOTICE.txt /tech-debt.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ha/etc/hadb/tm_tx_log.1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /com/README.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/active_tx_log: -------------------------------------------------------------------------------- 1 | tm_tx_log.1 -------------------------------------------------------------------------------- /ha/etc/hadb/nioneo_logical.log.active: -------------------------------------------------------------------------------- 1 | C -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.nodestore.db.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.id: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshipstore.db.id: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db: -------------------------------------------------------------------------------- 1 | PropertyStore v0.9.5 -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.arrays.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.index.id: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.strings.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshiptypestore.db.id: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.index: -------------------------------------------------------------------------------- 1 | PropertyIndex v0.9.5 -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.index.keys.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshiptypestore.db.names.id: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshipstore.db: -------------------------------------------------------------------------------- 1 | RelationshipStore v0.9.5 -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshiptypestore.db: -------------------------------------------------------------------------------- 1 | RelationshipTypeStore v0.9.5 -------------------------------------------------------------------------------- /udc/osgi.bnd: -------------------------------------------------------------------------------- 1 | Bundle-Activator: ${bundle.namespace}.impl.osgi.OSGiActivator 2 | -------------------------------------------------------------------------------- /udc/src/main/assembly/forNeo4j.properties: -------------------------------------------------------------------------------- 1 | neo4j-source-distribution=neo4j 2 | -------------------------------------------------------------------------------- /udc/src/main/assembly/forMavenCentral.properties: -------------------------------------------------------------------------------- 1 | neo4j-source-distribution=maven 2 | -------------------------------------------------------------------------------- /graph-algo/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel") 3 | } 4 | -------------------------------------------------------------------------------- /integration-test/integration/osgi/src/main/resources/readme.txt: -------------------------------------------------------------------------------- 1 | Bundle resources go here 2 | -------------------------------------------------------------------------------- /integration-test/integration/poja/src/main/resources/readme.txt: -------------------------------------------------------------------------------- 1 | Bundle resources go here 2 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/etc/hadb/neostore -------------------------------------------------------------------------------- /integration-test/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel") 3 | } 4 | -------------------------------------------------------------------------------- /integration-test/integration/standard/src/test/resources/readme.txt: -------------------------------------------------------------------------------- 1 | Bundle resources go here 2 | -------------------------------------------------------------------------------- /ha/README.txt: -------------------------------------------------------------------------------- 1 | For documentation see: 2 | http://wiki.neo4j.org/content/High_Availability_Cluster 3 | 4 | -------------------------------------------------------------------------------- /ha/bin/zkdevcluster.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | $(dirname $(cd $(dirname $0); pwd))/src/main/script/$(basename $0) 3 | -------------------------------------------------------------------------------- /wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ha/bin/hadevcluster.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | $(dirname $(cd $(dirname $0); pwd))/src/main/script/$(basename $0) "$@" 3 | -------------------------------------------------------------------------------- /jmx/src/main/resources/META-INF/services/org.neo4j.kernel.KernelExtension: -------------------------------------------------------------------------------- 1 | org.neo4j.jmx.impl.JmxExtension 2 | -------------------------------------------------------------------------------- /kernel/src/main/resources/META-INF/services/org.neo4j.kernel.Version: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.impl.ComponentVersion 2 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.index.keys: -------------------------------------------------------------------------------- 1 | +StringPropertyStore v0.9.5 -------------------------------------------------------------------------------- /ha/src/docs/dev/images/ha1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/src/docs/dev/images/ha1.png -------------------------------------------------------------------------------- /ha/src/docs/dev/images/ha2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/src/docs/dev/images/ha2.png -------------------------------------------------------------------------------- /ha/src/docs/dev/images/ha3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/src/docs/dev/images/ha3.png -------------------------------------------------------------------------------- /udc/src/main/filtered-resources/org/neo4j/ext/udc/udc.properties: -------------------------------------------------------------------------------- 1 | neo4j.ext.udc.source=${neo4j-source-distribution} 2 | -------------------------------------------------------------------------------- /udc/src/main/resources/META-INF/services/org.neo4j.kernel.KernelExtension: -------------------------------------------------------------------------------- 1 | org.neo4j.ext.udc.impl.UdcExtensionImpl 2 | -------------------------------------------------------------------------------- /backup/src/main/resources/META-INF/services/org.neo4j.kernel.KernelExtension: -------------------------------------------------------------------------------- 1 | org.neo4j.backup.OnlineBackupExtension 2 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.nodestore.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/etc/hadb/neostore.nodestore.db -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.relationshiptypestore.db.names: -------------------------------------------------------------------------------- 1 | +StringPropertyStore v0.9.5 -------------------------------------------------------------------------------- /ha/src/main/resources/META-INF/services/org.neo4j.backup.BackupExtensionService: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.ha.backup.HaBackupProvider -------------------------------------------------------------------------------- /ha/src/main/resources/META-INF/services/org.neo4j.jmx.impl.ManagementBeanProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.HighAvailabilityBean 2 | -------------------------------------------------------------------------------- /jmx/src/main/resources/META-INF/services/org.neo4j.jmx.impl.ManagementBeanProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.jmx.impl.PrimitivesBean 2 | -------------------------------------------------------------------------------- /graph-algo/src/main/model/model.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/graph-algo/src/main/model/model.PNG -------------------------------------------------------------------------------- /kernel/src/main/resources/META-INF/services/org.neo4j.kernel.KernelExtension: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.impl.management.JmxExtension 2 | -------------------------------------------------------------------------------- /backup/src/test/resources/META-INF/services/org.neo4j.backup.BackupExtensionService: -------------------------------------------------------------------------------- 1 | org.neo4j.backup.test.ExitOnCallBackupProvider -------------------------------------------------------------------------------- /management/src/main/resources/META-INF/services/com.sun.tools.jconsole.JConsolePlugin: -------------------------------------------------------------------------------- 1 | org.neo4j.management.impl.jconsole.Neo4jPlugin 2 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.arrays: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/etc/hadb/neostore.propertystore.db.arrays -------------------------------------------------------------------------------- /ha/osgi.bnd: -------------------------------------------------------------------------------- 1 | Export-Package: ${bundle.namespace}.ha.*;version="${pom.version}",org.neo4j.kernel,org.neo4j.management.*;version="${pom.version}" -------------------------------------------------------------------------------- /lucene-index/src/main/resources/META-INF/services/org.neo4j.graphdb.index.IndexProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.index.impl.lucene.LuceneIndexProvider 2 | -------------------------------------------------------------------------------- /management/src/main/resources/META-INF/services/org.neo4j.jmx.impl.ManagementSupport: -------------------------------------------------------------------------------- 1 | org.neo4j.management.impl.HotspotManagementSupport 2 | -------------------------------------------------------------------------------- /udc/src/test/resources/org/neo4j/ext/udc/udc.properties: -------------------------------------------------------------------------------- 1 | neo4j.ext.udc.source=unit-testing 2 | neo4j.ext.udc.arbitrary=usage-information 3 | -------------------------------------------------------------------------------- /ha/etc/hadb/neostore.propertystore.db.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/ha/etc/hadb/neostore.propertystore.db.strings -------------------------------------------------------------------------------- /kernel/src/test/resources/META-INF/services/org.neo4j.kernel.KernelExtension: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.DummyExtension 2 | org.neo4j.kernel.OtherExtension 3 | -------------------------------------------------------------------------------- /management/src/docs/ops/images/jconsole_beans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/management/src/docs/ops/images/jconsole_beans.png -------------------------------------------------------------------------------- /graph-algo/src/docs/dev/images/graphalgo-astar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/graph-algo/src/docs/dev/images/graphalgo-astar.png -------------------------------------------------------------------------------- /management/src/docs/ops/images/jconsole_connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/management/src/docs/ops/images/jconsole_connect.png -------------------------------------------------------------------------------- /ha/bin/startzk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -cp lib/zookeeper-3.2.1.jar:lib/log4j-1.2.15.jar org.apache.zookeeper.server.quorum.QuorumPeerMain etc/zkserver.cfg 4 | -------------------------------------------------------------------------------- /management/CHANGES.txt: -------------------------------------------------------------------------------- 1 | o Split up the management component in two, one ("jmx") with basic support and one ("management" - this component) with advanced support. -------------------------------------------------------------------------------- /lucene-index/src/docs/dev/images/indexing-imdb-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-attic/graphdb/HEAD/lucene-index/src/docs/dev/images/indexing-imdb-example.png -------------------------------------------------------------------------------- /kernel/src/main/resources/META-INF/services/org.neo4j.kernel.impl.transaction.TransactionManagerProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.impl.transaction.DefaultTransactionManagerProvider 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | \#* 3 | .gradle 4 | target 5 | build 6 | *.swp 7 | .project 8 | .classpath 9 | .settings 10 | *.iws 11 | *.ipr 12 | *.iml 13 | .idea 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /jmx/README.txt: -------------------------------------------------------------------------------- 1 | This component exposes a JMX interface to the Neo4j kernel. 2 | It is optional and loaded as a kernel extension. 3 | For more information, see http://components.neo4j.org/neo4j-management/ -------------------------------------------------------------------------------- /lucene-index/osgi.bnd: -------------------------------------------------------------------------------- 1 | Export-Package: org.neo4j.graphdb.index,!${bundle.namespace}.impl.*,${bundle.namespace}.*;version="${project.version}",org.apache.lucene 2 | Private-Package: ${bundle.namespace}.* -------------------------------------------------------------------------------- /management/README.txt: -------------------------------------------------------------------------------- 1 | This component extends the Neo4j JMX component with management support for 2 | the Neo4j graph database. 3 | For more information, see http://components.neo4j.org/neo4j-management/ -------------------------------------------------------------------------------- /integration-test/integration/readme.md: -------------------------------------------------------------------------------- 1 | neo4j-release integration 2 | ========================= 3 | 4 | Integration tests for Neo4j components, grouped into standard j2se and 5 | OSGi-friendly collections. 6 | 7 | 8 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | ["kernel", "graph-algo", "lucene-index", "udc", "ha", "management", "integration-test", "com"].each { p -> 2 | include "neo4j-$p" 3 | project(":neo4j-$p").projectDir = new File(rootDir, p) 4 | } 5 | -------------------------------------------------------------------------------- /kernel/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | 3 | Neo4j is a graph database. It is an embedded, disk-based, fully transactional 4 | Java persistence engine that stores data structured in graphs rather than in tables. 5 | -------------------------------------------------------------------------------- /ha/etc/zkserver.cfg: -------------------------------------------------------------------------------- 1 | tickTime=2000 2 | initLimit=10 3 | syncLimit=5 4 | dataDir=var/zookeeper/ 5 | clientPort=2181 6 | 7 | server.1=172.16.2.33:2888:3888 8 | server.2=172.16.1.242:2888:3888 9 | server.3=172.16.4.14:2888:3888 10 | -------------------------------------------------------------------------------- /ha/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j High Availability component 2 | 3 | This component provides the means to set up a cluster of Neo4j instances that act together 4 | as a cluster, providing Master-Slave replication and other features. -------------------------------------------------------------------------------- /ha/src/main/script/bootstrap.sh: -------------------------------------------------------------------------------- 1 | SCRIPTDIR=$(cd $(dirname $0); pwd) 2 | HADIR=$(dirname $(dirname $(dirname $SCRIPTDIR))) 3 | HAZIP="$HADIR/target/neo4j-ha-0.5-SNAPSHOT-dev.zip" 4 | LIBDIR="$HADIR/target/dependency" 5 | function rebuild () { 6 | return 0 7 | } 8 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | Neo4j Graph Database 2 | ==================== 3 | 4 | The contents of this repository has been migrated to the Community 5 | edition of Neo4j, now available here: https://github.com/neo4j/community 6 | 7 | For more information, visit: 8 | http://neo4j.org/ 9 | -------------------------------------------------------------------------------- /udc/readme.md: -------------------------------------------------------------------------------- 1 | Neo4j UDC 2 | ========= 3 | 4 | The Usage Data Collector (UDC) is a kernel extension which collects 5 | statistics about a Neo4j Server. 6 | 7 | For details, please see the [wiki page][1]. 8 | 9 | [1]: http://wiki.neo4j.org/content/UDC "UDC Wiki" 10 | -------------------------------------------------------------------------------- /udc/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j UDC 2 | 3 | Neo4j Usage Data Collector (UDC) is a lightweight framework for collecting 4 | statistics about a Neo4j server. 5 | 6 | For details, please see the {{{http://docs.neo4j.org/chunked/snapshot/usage-data-collector.html} Neo4j manual}}. 7 | 8 | -------------------------------------------------------------------------------- /com/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel"), "org.jboss.netty:netty:$nettyVersion" 3 | 4 | testCompile "commons-io:commons-io:$commonsIoVersion" 5 | } 6 | 7 | sourceSets { 8 | test { 9 | classpath += project(':neo4j-kernel').sourceSets.test.classes 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /integration-test/integration/osgi/osgi.bnd: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------- 2 | # Use this file to add customized Bnd instructions for the bundle 3 | #----------------------------------------------------------------- 4 | 5 | Bundle-Activator: ${bundle.namespace}.internal.ExampleActivator 6 | -------------------------------------------------------------------------------- /integration-test/integration/poja/osgi.bnd: -------------------------------------------------------------------------------- 1 | #----------------------------------------------------------------- 2 | # Use this file to add customized Bnd instructions for the bundle 3 | #----------------------------------------------------------------- 4 | 5 | Bundle-Activator: ${bundle.namespace}.internal.ExampleActivator 6 | -------------------------------------------------------------------------------- /integration-test/include/readme.md: -------------------------------------------------------------------------------- 1 | neo4j-release include 2 | ===================== 3 | 4 | A release submodule for dependency poms. 5 | 6 | Dependency Poms 7 | --------------- 8 | 9 | * neo4j - standard set of Neo4j release components 10 | * neo4j-superset - every released component. Not for general use 11 | 12 | 13 | -------------------------------------------------------------------------------- /kernel/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: GenerateVersionClass 2 | 3 | dependencies { 4 | compile "org.apache.geronimo.specs:geronimo-jta_1.1_spec:$jtaSpecVersion" 5 | 6 | //TODO mark osgi optional 7 | compile "org.osgi:osgi_R4_core:$osgiVersion", 8 | "org.osgi:osgi_R4_compendium:$osgiVersion" 9 | } 10 | -------------------------------------------------------------------------------- /integration-test/include/neo4j-superset/readme.md: -------------------------------------------------------------------------------- 1 | neo4j superset release 2 | ====================== 3 | 4 | The comprehensive collection of components included 5 | in this dependency pom are not recommended for general 6 | use. Please see org.neo4j:neo4j (in the source tree, 7 | located in ../neo4j from here). 8 | 9 | 10 | -------------------------------------------------------------------------------- /neo4j/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel"), 3 | project(":neo4j-com"), 4 | project(":neo4j-lucene-index"), 5 | project(":neo4j-graph-algo"), 6 | project(":neo4j-ha"), 7 | project(":neo4j-management"), 8 | project(":neo4j-udc") 9 | } 10 | -------------------------------------------------------------------------------- /lucene-index/src/test/resources/old-index.db: -------------------------------------------------------------------------------- 1 | indexOneproviderlucenetypeexact 2 | indexThreeproviderlucenetypeexactindexTwo to_lower_casetrueproviderlucenetypefulltext -------------------------------------------------------------------------------- /udc/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | -------------------------------------------------------------------------------- /graph-algo/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2009 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | -------------------------------------------------------------------------------- /lucene-index/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | -------------------------------------------------------------------------------- /lucene-index/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel"), 3 | "org.apache.servicemix.bundles:org.apache.servicemix.bundles.lucene:$luceneBundleVersion" 4 | 5 | testCompile "commons-io:commons-io:$commonsIoVersion" 6 | } 7 | 8 | sourceSets { 9 | test { 10 | classpath += project(':neo4j-kernel').sourceSets.test.classes 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /management/src/main/resources/META-INF/services/org.neo4j.jmx.impl.ManagementBeanProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.management.impl.CacheBean 2 | org.neo4j.management.impl.ConfigurationBean 3 | org.neo4j.management.impl.LockManagerBean 4 | org.neo4j.management.impl.MemoryMappingBean 5 | org.neo4j.management.impl.StoreFileBean 6 | org.neo4j.management.impl.TransactionManagerBean 7 | org.neo4j.management.impl.XaManagerBean 8 | -------------------------------------------------------------------------------- /integration-test/readme.md: -------------------------------------------------------------------------------- 1 | neo4j-release 2 | ============= 3 | 4 | This multi-module project hosts the build process for producing 5 | a versioned release of Neo4j. 6 | 7 | Sub-modules 8 | ----------- 9 | 10 | * integration - component integration tests 11 | * assembly - build assemblies for packaged products 12 | * include - org.neo4j:neo4j dependency pom, defining the standard artifact set 13 | * build - parent for any compilable artifacts 14 | 15 | -------------------------------------------------------------------------------- /backup/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 1.3 GA 2 | ------ 3 | o Removed dependency on HA. Now it is expected that resolving the master of a ZooKeeper cluster is the responsibility of the HA component, providing it as a @Service. 4 | o Removed the -from-ha argument, since it is not needed 5 | o Switched from explicit backup target implementation specification (ha or simple for the time being) to a URI format. 6 | 7 | 1.3.M03 (2011-02-25) 8 | -------------------- 9 | o Initial release. 10 | -------------------------------------------------------------------------------- /management/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j Management Kernel extension 2 | 3 | The Neo4j Management component provides a kernel extension to the Neo4j Kernel that, when loaded, provides convenient methods for accessing JMX-related functionality via code like 4 | 5 | %{source-code|snippet=getKernel|file=src/test/java/org/neo4j/management/ManagementBeansTest.java} 6 | 7 | 8 | See also 9 | 10 | * {{{http://wiki.neo4j.org/content/Getting_Started}Getting started with Neo4j}} 11 | -------------------------------------------------------------------------------- /kernel/src/main/resources/META-INF/services/org.neo4j.kernel.impl.management.ManagementBeanProvider: -------------------------------------------------------------------------------- 1 | org.neo4j.kernel.impl.management.CacheBean 2 | org.neo4j.kernel.impl.management.ConfigurationBean 3 | org.neo4j.kernel.impl.management.LockManagerBean 4 | org.neo4j.kernel.impl.management.MemoryMappingBean 5 | org.neo4j.kernel.impl.management.PrimitivesBean 6 | org.neo4j.kernel.impl.management.StoreFileBean 7 | org.neo4j.kernel.impl.management.TransactionManagerBean 8 | org.neo4j.kernel.impl.management.XaManagerBean 9 | -------------------------------------------------------------------------------- /com/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 1.3.M05 (2011-03-24) 2 | ------------------- 3 | o Fixed a bug that could occur when copying the store. 4 | 5 | 1.3.M04 (2011-03-10) 6 | -------------------- 7 | o Backup disabled when run on Windows due to limitations in OS/filesystem. 8 | 9 | 1.3.M03 (2011-02-24) 10 | -------------------- 11 | o Patched to work with new backup tool. 12 | o Added a check client-side so that server store ID matches client store ID. 13 | 14 | 1.3.M02 (2011-02-10) 15 | -------------------- 16 | o Initial release. 17 | 18 | -------------------------------------------------------------------------------- /jmx/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | 10 | The bundled Apache Geronimo JTA library is copyright 11 | The Apache Software Foundation (http://www.apache.org/) 12 | under the Apache License version 2.0. 13 | -------------------------------------------------------------------------------- /kernel/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | 10 | The bundled Apache Geronimo JTA library is copyright 11 | The Apache Software Foundation (http://www.apache.org/) 12 | under the Apache License version 2.0. 13 | -------------------------------------------------------------------------------- /kernel/src/docs/ops/index.txt: -------------------------------------------------------------------------------- 1 | [[configuration]] 2 | Configuration & Performance 3 | =========================== 4 | 5 | In order to get optimum performance out of Neo4j for your application there are a few parameters that can be tweaked. 6 | The two main components that can be configured are the Neo4j caches and the JVM that Neo4j runs in. 7 | The following sections describe how to tune these. 8 | 9 | 10 | :leveloffset: 2 11 | 12 | include::cache.txt[] 13 | 14 | include::jvm.txt[] 15 | 16 | include::short-strings.txt[] 17 | 18 | -------------------------------------------------------------------------------- /management/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 9 | 10 | The bundled Apache Geronimo JTA library is copyright 11 | The Apache Software Foundation (http://www.apache.org/) 12 | under the Apache License version 2.0. 13 | -------------------------------------------------------------------------------- /kernel/README.txt: -------------------------------------------------------------------------------- 1 | To get started and for more information about Neo4j, go to http://neo4j.org. 2 | 3 | Quick start for non-Maven users: 4 | 5 | o add the neo4j-kernel and geronimo-jta jar files to your classpath/project 6 | o javadoc for the Neo4j API can be found at http://api.neo4j.org/current 7 | (in eclipse right click the neo4j-kernel jar file Properties->Javadoc location) 8 | o see javadoc for org.neo4j.graphdb.GraphDatabaseService to get started 9 | 10 | Also see the Getting Started Guides at http://wiki.neo4j.org. 11 | 12 | -------------------------------------------------------------------------------- /lucene-index/tech-debt.txt: -------------------------------------------------------------------------------- 1 | [2010-02-26] osgi.bnd is broken 2 | Currently one class is copied from Lucene into the created jar, 3 | this is the best I could do while making sure all classes of this 4 | component made it into the jar. 5 | 6 | [2010-02-24] Disabled test cases to please hudson 7 | Hudson has MAJOR issues. In an attempt to get a build through things 8 | need to be changed in subtle ways to please Hudson. 9 | * src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java 10 | Disabled testSortByRelevance 11 | -------------------------------------------------------------------------------- /lucene-index/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j Lucene Index 2 | 3 | Integration layer between Neo4j and Lucene, providing one possible implementation 4 | of the Index API. Implements the <<>> extension from the Neo4j kernel 5 | and provides <<>> instances with lucene as backend. 6 | 7 | This implementation is the default to use as a backend for an index if no provider 8 | is specified. The provider name is "lucene". 9 | 10 | See {{{http://docs.neo4j.org/chunked/snapshot/indexing.html}the documentation}} for more information. 11 | 12 | -------------------------------------------------------------------------------- /udc/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel"), 3 | "org.apache.httpcomponents:httpcore:$httpComponentsVersion", 4 | "commons-io:commons-io:$commonsIoVersion" 5 | 6 | testCompile("org.apache.httpcomponents:httpclient:$httpComponentsVersion") { 7 | artifact { 8 | name = 'httpclient' 9 | type = 'jar' 10 | classifier = 'tests' 11 | } 12 | artifact { 13 | name = 'httpclient' 14 | type = 'jar' 15 | classifier = '' 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /kernel/README.sources.txt: -------------------------------------------------------------------------------- 1 | Today (2007-11-19) AGPL was released so we can finally release the source code. 2 | 3 | To start hacking, import src/main/java into your favorite IDE and add the 4 | geronimo-jta jar file to your classpath. 5 | 6 | To get started here is a short description of some of the important packages: 7 | 8 | o kernel & kernel.impl.core, implementation of the Neo4j API 9 | o kernel.impl.nioneo, native store implementation 10 | o kernel.impl.transaction, TM + RWLocks implementation 11 | o kernel.impl.transaction.xaframework, make non XA resources XA enabled 12 | 13 | -------------------------------------------------------------------------------- /graph-algo/osgi.bnd: -------------------------------------------------------------------------------- 1 | Export-Package: org.neo4j.graphalgo.*;version="${pom.version}" 2 | 3 | # ABK: using DynamicImport-Package is inelegant, but will do for now. 4 | # The registration of services should be revised to 5 | # use alternate facilities for injecting the implementation classes. 6 | DynamicImport-Package: * 7 | Implementation-Title: ${project.name} 8 | Implementation-Version: ${project.version} 9 | Implementation-Vendor-Id: ${project.groupId} 10 | Implementation-Revision: ${vcs.committedRevision} 11 | Implementation-Revision-Status: revision=${vcs.revision};status=${vcs.status};path=${vcs.path} 12 | -------------------------------------------------------------------------------- /ha/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | compile project(":neo4j-kernel"), 3 | project(":neo4j-com"), 4 | project(":neo4j-lucene-index"), 5 | project(":neo4j-management") 6 | 7 | compile("org.apache.zookeeper:zookeeper:$zookeeperVersion") { 8 | exclude module: "jline" 9 | exclude module: "log4j" 10 | } 11 | 12 | testCompile "commons-io:commons-io:$commonsIoVersion" 13 | testCompile "log4j:log4j:$log4jVersion" 14 | } 15 | 16 | sourceSets { 17 | test { 18 | classpath += project(':neo4j-kernel').sourceSets.test.classes 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ha/src/main/script/shutdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f $2 ]; then 4 | PIDS=$(jps -l | grep $1 | sort | join $2 - | cut -f1 -d\ ) 5 | if [ -n "$PIDS" ]; then 6 | echo Shutting down previous instances 7 | kill $PIDS 8 | 9 | for sec in {1..10}; do 10 | sleep 1 11 | PIDS=$(jps -l | grep $1 | sort | join $2 - | cut -f1 -d\ ) 12 | if [ -z "$PIDS" ]; then 13 | break 14 | fi 15 | done 16 | 17 | if [ -n "$PIDS" ]; then 18 | echo Killing previous instances 19 | kill -9 $PIDS 20 | fi 21 | fi 22 | fi 23 | -------------------------------------------------------------------------------- /com/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /ha/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /jmx/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /udc/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /backup/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2011 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /graph-algo/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2008-2009 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /kernel/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /lucene-index/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /management/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | This software is Copyright (c) 2002-2010 "Neo Technology," 2 | Network Engine for Objects in Lund AB [http://neotechnology.com] 3 | 4 | It is licensed under the GNU Affero General Public License version 3 or later, 5 | which in essence means that it's free to embed in other works of free software. 6 | 7 | However, if you're writing non-free (which usually means commercial) software 8 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 9 | (http://neotechnology.com). 10 | 11 | For legalese details, see LICENSE.txt. 12 | 13 | For more information, contact info@neotechnology.com. 14 | -------------------------------------------------------------------------------- /backup/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2011 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | The bundled Apache Geronimo JTA library is copyright 9 | The Apache Software Foundation (http://www.apache.org/) 10 | under the Apache License version 2.0. 11 | 12 | The bundled Commons IO library is copyright 13 | The Apache Software Foundation (http://www.apache.org/) 14 | under the Apache License version 2.0. 15 | 16 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 17 | 18 | -------------------------------------------------------------------------------- /ha/src/docs/dev/index.txt: -------------------------------------------------------------------------------- 1 | [[ha]] 2 | High Availability 3 | ================= 4 | 5 | Neo4j High Availability or “Neo4j HA” provides the following two main features: 6 | 7 | . It enables a _fault-tolerant database architecture_, where several Neo4j slave databases can be configured to be exact replicas of a single Neo4j master database. 8 | This allows the end-user system to be fully functional and both read and write to the database in the event of hardware failure. 9 | . It enables a _horizontally scaling read-mostly architecture_ that enables the system to handle more read load than a single Neo4j database instance can handle. 10 | 11 | :leveloffset: 2 12 | 13 | include::architecture.txt[] 14 | 15 | include::config.txt[] 16 | 17 | include::operation.txt[] 18 | 19 | -------------------------------------------------------------------------------- /integration-test/include/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 4.0.0 5 | 6 | 7 | org.neo4j.release 8 | release-project 9 | 1.3-SNAPSHOT 10 | 11 | 12 | org.neo4j.release 13 | include 14 | 1.3-SNAPSHOT 15 | 16 | Neo4j Include 17 | 18 | pom 19 | 20 | 21 | neo4j-superset 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /kernel/osgi.bnd: -------------------------------------------------------------------------------- 1 | Export-Package: !${bundle.namespace}.graphdb.impl.*,${bundle.namespace}.graphdb.*;version="${pom.version}",${bundle.namespace}.kernel.impl.*,${bundle.namespace}.kernel.*;version="${pom.version}",!${bundle.namespace}.helpers.impl.*,${bundle.namespace}.helpers.*;version="${pom.version}" 2 | 3 | Import-Package: javax.transaction;version="1.1",* 4 | 5 | # ABK: using DynamicImport-Package is inelegant, but will do for now. 6 | # The registration of services should be revised to 7 | # use alternate facilities for injecting the implementation classes. 8 | DynamicImport-Package: * 9 | Implementation-Title: ${project.name} 10 | Implementation-Version: ${project.version} 11 | Implementation-Vendor-Id: ${project.groupId} 12 | Bundle-Activator: ${bundle.namespace}.kernel.impl.osgi.OSGiActivator -------------------------------------------------------------------------------- /ha/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | Copyright (c) 2002-2010 "Neo Technology," Network Engine for Objects in Lund AB 3 | [http://neotechnology.com] 4 | 5 | This product includes software developed by "Neo Technology," 6 | Network Engine for Objects in Lund AB (http://neotechnology.com). 7 | 8 | The bundled graph database engine is copyright 9 | "Neo Technology," Network Engine for Objects in Lund AB 10 | and licensed under the GNU AFFERO GENERAL PUBLIC LICENSE 11 | Version 3 (http://www.fsf.org/licensing/licenses/agpl-3.0.html). 12 | 13 | For licensing information, see COPYRIGHT.txt and LICENSE.txt. 14 | 15 | Third party libraries 16 | --------------------- 17 | 18 | Full license texts are found in LICENSES.txt. 19 | 20 | The Apache Software License, Version 2.0: Geronimo Java Transaction API, 21 | Netty, Log4j 22 | -------------------------------------------------------------------------------- /integration-test/integration/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | org.neo4j.release 6 | release-project 7 | 1.3-SNAPSHOT 8 | 9 | 10 | 4.0.0 11 | org.neo4j.release 12 | integration 13 | 14 | neo4j-release :: integration tests 15 | 16 | pom 17 | 18 | 19 | poja 20 | standard 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /graph-algo/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j graph-algo 2 | 3 | Neo4j graph-algo is a component that contains Neo4j implementations of 4 | some common algorithms for graphs. Algorithms considered production quality 5 | can be found in <> factory. There you can 6 | find algos for shortest paths, all paths, all simple paths, Dijkstra and A* etc. 7 | 8 | See {{{http://docs.neo4j.org/chunked/snapshot/graph-algo.html}the documentation}} for more information. 9 | 10 | Other algos 11 | 12 | There are other algorithms which can be used on smaller graphs, f.ex. calculating 13 | centrality, betweeness, closeness, eccentrity and more. Those algos aren't designed 14 | to scale to very big graphs, but can still be useful in some scenarios. They reside in the 15 | <> package and are not considered production quality. 16 | -------------------------------------------------------------------------------- /udc/tech-debt.txt: -------------------------------------------------------------------------------- 1 | [2010-02-09] Make IndexService "stateless" 2 | The actual state of the IndexService is not managed by the implementing 3 | classes, it's handled by the XA-resources. It should thus be possible 4 | to have the IndexService implementations simply lookup the XA-resource 5 | and use it, instantiating it (with proper locking) if necessary. 6 | This adds a problem: how should we deal with shutdown() if there are 7 | multiple implementations - the solution is to use the event framework 8 | and have the XA-resource subscribe to the pre-shutdown event from kernel, 9 | and do it's shutdown procedures then. 10 | [2010-03-18] Check why BND thinks there are split packages over several jars 11 | It gives warnings in OSGi bundle phase right now 12 | [2010-03-19] Move some long-running tests to a new QA project 13 | f.ex: TestLuceneIndexManyThreads, TestLuceneIndexLazyness, TestBatchInsert#testHmm (great name huh?) -------------------------------------------------------------------------------- /ha/src/main/script/zkdevcluster.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source $(dirname $0)/bootstrap.sh 3 | 4 | MAINCLASS=org.apache.zookeeper.server.quorum.QuorumPeerMain 5 | 6 | $SCRIPTDIR/shutdown.sh $MAINCLASS pid/zk 7 | 8 | mkdir -p etc pid 9 | rm -f pid/zk 10 | 11 | for ZK in {1,2,3}; do 12 | ZKCONF=etc/zk$ZK.cfg 13 | 14 | echo tickTime=2000 > $ZKCONF 15 | echo initLimit=10 >>$ZKCONF 16 | echo syncLimit=5 >>$ZKCONF 17 | 18 | echo dataDir=data/zk$ZK >>$ZKCONF 19 | echo clientPort=218$ZK >>$ZKCONF 20 | 21 | echo server.1=localhost:2888:3888 >>$ZKCONF 22 | echo server.2=localhost:2889:3889 >>$ZKCONF 23 | echo server.3=localhost:2890:3890 >>$ZKCONF 24 | 25 | rm -rf data/zk$ZK 26 | mkdir -p data/zk$ZK 27 | echo $ZK > data/zk$ZK/myid 28 | 29 | log4j=`echo $LIBDIR/log4j-*.jar` 30 | zookeeper=`echo $LIBDIR/zookeeper-*.jar` 31 | 32 | java -cp $log4j:$zookeeper $MAINCLASS $ZKCONF & 33 | echo $! >> pid/zk 34 | done 35 | 36 | -------------------------------------------------------------------------------- /kernel/src/docs/ops/introduction.txt: -------------------------------------------------------------------------------- 1 | [[configuration-introduction]] 2 | Introduction 3 | =========== 4 | 5 | To gain good performance, these are the things to look into first: 6 | 7 | * Make sure the JVM is not spending too much time performing garbage collection. 8 | Monitoring heap usage on an application that uses Neo4j can be a bit confusing since Neo4j will increase the size of caches if there is available memory and decrease if the heap is getting full. 9 | The goal is to have a large enough heap to make sure that heavy/peak load will not result in so called GC trashing (performance can drop as much as two orders of magnitude when GC trashing happens). 10 | * Start the JVM with the -server flag and a good sized heap (see <>). Having too large heap may also hurt performance so you may have to try some different heap sizes. 11 | * Use the parallel/concurrent garbage collector (we found that -XX:+UseConcMarkSweepGC works well in most use-cases) 12 | 13 | 14 | -------------------------------------------------------------------------------- /jmx/src/main/java/org/neo4j/jmx/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Management support using JMX. 22 | */ 23 | package org.neo4j.jmx; 24 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Event framework. 22 | */ 23 | package org.neo4j.graphdb.event; 24 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/traversal/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Traversal framework. 22 | */ 23 | package org.neo4j.graphdb.traversal; 24 | -------------------------------------------------------------------------------- /management/src/main/java/org/neo4j/management/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Management support using JMX. 22 | */ 23 | package org.neo4j.management; 24 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * The graph database API used by Neo4j. 22 | */ 23 | package org.neo4j.graphdb; 24 | 25 | -------------------------------------------------------------------------------- /ha/src/test/java/slavetest/Fetcher.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package slavetest; 21 | 22 | public interface Fetcher 23 | { 24 | T fetch(); 25 | 26 | void close(); 27 | } 28 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/TransactionIdFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction; 21 | 22 | public interface TransactionIdFactory 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2010 the original author or authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | #Wed Nov 18 15:48:45 EST 2009 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | zipStoreBase=GRADLE_USER_HOME 21 | distributionVersion=0.9-20100409151905+1000 22 | #distributionVersion=0.9-20100226145830+1100 23 | zipStorePath=wrapper/dists 24 | urlRoot=http\://snapshots.dist.codehaus.org/gradle 25 | distributionName=gradle 26 | distributionClassifier=bin 27 | -------------------------------------------------------------------------------- /com/src/test/java/org/neo4j/com/ServerInterface.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | public interface ServerInterface 23 | { 24 | void shutdown(); 25 | 26 | void awaitStarted(); 27 | } 28 | -------------------------------------------------------------------------------- /management/src/main/java/org/neo4j/management/impl/jconsole/UpdateEvent.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.management.impl.jconsole; 21 | 22 | abstract class UpdateEvent 23 | { 24 | abstract void apply(); 25 | } 26 | -------------------------------------------------------------------------------- /backup/src/test/java/org/neo4j/backup/ServerInterface.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.backup; 21 | 22 | public interface ServerInterface 23 | { 24 | void shutdown(); 25 | 26 | void awaitStarted(); 27 | } 28 | -------------------------------------------------------------------------------- /integration-test/include/neo4j-superset/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 4.0.0 5 | 6 | 7 | org.neo4j.release 8 | include 9 | 1.3-SNAPSHOT 10 | 11 | 12 | org.neo4j 13 | neo4j-superset 14 | 15 | Neo4j Superset Release 16 | Dependency pom for all released components. Not recommended for general use. 17 | 1.3-SNAPSHOT 18 | 19 | pom 20 | 21 | 22 | 23 | pom 24 | org.neo4j 25 | neo4j 26 | ${neo4j-release.version} 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/helpers/collection/ClosableIterable.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.helpers.collection; 21 | 22 | public interface ClosableIterable extends Iterable 23 | { 24 | void close(); 25 | } 26 | -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/Command.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public abstract class Command 23 | { 24 | public abstract void doWork( CommandState state ); 25 | } 26 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/traversal/UniquenessFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphdb.traversal; 21 | 22 | public interface UniquenessFactory 23 | { 24 | UniquenessFilter create( Object optionalParameter ); 25 | } 26 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/core/LastCommittedTxIdSetter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.core; 21 | 22 | public interface LastCommittedTxIdSetter 23 | { 24 | void setLastCommittedTxId( long txId ); 25 | } 26 | -------------------------------------------------------------------------------- /com/src/test/java/org/neo4j/com/MadeUpWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import java.nio.channels.ReadableByteChannel; 23 | 24 | public interface MadeUpWriter 25 | { 26 | void write( ReadableByteChannel data ); 27 | } 28 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/helpers/collection/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Collections utilities - Iterator/Iterable utilities and creating 22 | * {@link java.util.Map}s. 23 | */ 24 | package org.neo4j.helpers.collection; 25 | 26 | 27 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/centrality/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Centrality graph algorithms which are allright to use, but doesn't scale 22 | * to bigger graphs. 23 | */ 24 | package org.neo4j.graphalgo.impl.centrality; 25 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/cache/ReferenceCache.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.cache; 21 | 22 | public abstract class ReferenceCache implements Cache 23 | { 24 | protected abstract void pollClearedValues(); 25 | } 26 | -------------------------------------------------------------------------------- /kernel/src/test/java/org/neo4j/kernel/impl/MyRelTypes.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl; 21 | 22 | import org.neo4j.graphdb.RelationshipType; 23 | 24 | public enum MyRelTypes implements RelationshipType 25 | { 26 | TEST, TEST_TRAVERSAL, TEST2 27 | } -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/RequestType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | public interface RequestType 23 | { 24 | MasterCaller getMasterCaller(); 25 | 26 | ObjectSerializer getObjectSerializer(); 27 | 28 | byte id(); 29 | } 30 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Implementation for embedding a Neo4j graph database in an application. 22 | * Classes are provided for both read/write mode and read only mode. 23 | */ 24 | package org.neo4j.kernel; 25 | 26 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Scalable graph algorithms like shortest path and others for Neo4j which 22 | * can be easily accessed via {@link org.neo4j.graphalgo.GraphAlgoFactory}. 23 | */ 24 | package org.neo4j.graphalgo; 25 | -------------------------------------------------------------------------------- /graph-algo/src/test/java/common/GraphDefinition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package common; 21 | 22 | import org.neo4j.graphdb.GraphDatabaseService; 23 | import org.neo4j.graphdb.Node; 24 | 25 | public interface GraphDefinition 26 | { 27 | Node create( GraphDatabaseService graphdb ); 28 | } 29 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/LockType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction; 21 | 22 | /** 23 | * Enum defining the READ lock and the WRITE lock. 24 | */ 25 | public enum LockType 26 | { 27 | READ, WRITE 28 | } -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/helpers/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Common Java utilities. A collection of useful utilities which you very 22 | * often find yourself needing, but you can't (as of yet) find in the core 23 | * Java SDK. 24 | */ 25 | package org.neo4j.helpers; 26 | 27 | -------------------------------------------------------------------------------- /neo4j/src/main/resources/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | example 6 | example 7 | 0.0.1-SNAPSHOT 8 | example 9 | 10 | 11 | 12 | 13 | org.neo4j 14 | neo4j 15 | ${project.version} 16 | pom 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | maven-compiler-plugin 25 | 26 | 1.6 27 | 1.6 28 | UTF-8 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/MasterCaller.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import org.jboss.netty.buffer.ChannelBuffer; 23 | 24 | public interface MasterCaller 25 | { 26 | Response callMaster( M master, SlaveContext context, ChannelBuffer input, ChannelBuffer target ); 27 | } 28 | -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/DieCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class DieCommand extends Command 23 | { 24 | @Override 25 | public void doWork( CommandState state ) 26 | { 27 | state.alive = false; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /com/src/test/java/org/neo4j/com/MadeUpCommunicationInterface.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | public interface MadeUpCommunicationInterface 23 | { 24 | Response multiply( int value1, int value2 ); 25 | 26 | Response streamSomeData( MadeUpWriter writer, int dataSize ); 27 | } 28 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/ObjectSerializer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import java.io.IOException; 23 | 24 | import org.jboss.netty.buffer.ChannelBuffer; 25 | 26 | public interface ObjectSerializer 27 | { 28 | void write( T responseObject, ChannelBuffer result ) throws IOException; 29 | } 30 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/core/ReadOnlyDbException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.core; 21 | 22 | public class ReadOnlyDbException extends RuntimeException 23 | { 24 | public ReadOnlyDbException() 25 | { 26 | super( "This is a read only embedded Neo4j instance" ); 27 | } 28 | } -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/DeleteIndexCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class DeleteIndexCommand extends Command 23 | { 24 | @Override 25 | public void doWork( CommandState state ) 26 | { 27 | state.index.delete(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/LockManagerFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | import org.neo4j.kernel.impl.transaction.LockManager; 23 | import org.neo4j.kernel.impl.transaction.TxModule; 24 | 25 | public interface LockManagerFactory 26 | { 27 | LockManager create( TxModule txModule ); 28 | } 29 | -------------------------------------------------------------------------------- /kernel/src/test/java/org/neo4j/kernel/impl/traversal/GraphDefinition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.traversal; 21 | 22 | import org.neo4j.graphdb.GraphDatabaseService; 23 | import org.neo4j.graphdb.Node; 24 | 25 | public interface GraphDefinition 26 | { 27 | Node create( GraphDatabaseService graphdb ); 28 | } 29 | -------------------------------------------------------------------------------- /management/src/main/java/org/neo4j/management/RemoteConnection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.management; 21 | 22 | import org.neo4j.jmx.ManagementInterface; 23 | 24 | @ManagementInterface( name = RemoteConnection.NAME ) 25 | public interface RemoteConnection 26 | { 27 | final String NAME = "Remote Connection"; 28 | } 29 | -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/BrokerFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha; 21 | 22 | import java.util.Map; 23 | 24 | import org.neo4j.graphdb.GraphDatabaseService; 25 | 26 | public interface BrokerFactory 27 | { 28 | Broker create( GraphDatabaseService graphDb, Map graphDbConfig ); 29 | } 30 | -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/zookeeper/ZooKeeperTimedOutException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha.zookeeper; 21 | 22 | public class ZooKeeperTimedOutException extends ZooKeeperException 23 | { 24 | public ZooKeeperTimedOutException( String message ) 25 | { 26 | super( message ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ha/src/test/java/slavetest/Job.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package slavetest; 21 | 22 | import java.io.Serializable; 23 | import java.rmi.RemoteException; 24 | 25 | import org.neo4j.graphdb.GraphDatabaseService; 26 | 27 | public interface Job extends Serializable 28 | { 29 | T execute( GraphDatabaseService db ) throws RemoteException; 30 | } 31 | -------------------------------------------------------------------------------- /integration-test/integration/standard/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ../../build/ 6 | org.neo4j.release.build 7 | build-settings 8 | 1.3-SNAPSHOT 9 | 10 | 11 | 4.0.0 12 | org.neo4j.release.integration 13 | standard 14 | 1.3-SNAPSHOT 15 | 16 | neo4j-release :: j2se integration tests 17 | 18 | jar 19 | 20 | 21 | 22 | commons-io 23 | commons-io 24 | 1.4 25 | 26 | 27 | org.neo4j.release.integration 28 | poja 29 | 0.1-SNAPSHOT 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/index/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Integrated API for node and relationship indexing. 22 | *

23 | * A concrete implementation like the neo4j-lucene-index component must be available 24 | * on the classpath for indexing to work. 25 | */ 26 | package org.neo4j.graphdb.index; 27 | 28 | -------------------------------------------------------------------------------- /kernel/src/docs/ops/short-strings.txt: -------------------------------------------------------------------------------- 1 | [[short-strings]] 2 | Compressed storage of short strings 3 | =================================== 4 | 5 | Neo4j will classify your strings and store them accordingly. 6 | If a string is classified as a short string it will be stored without indirection in the property store. 7 | This means that there will be no string records created for storing that string. 8 | Additionally, when no string record is needed to store the property, it can be read and written in a single lookup. 9 | This leads to improvements in performance and lower storage overhead. 10 | 11 | For a string to be classified as a short string, one of the following must hold: 12 | 13 | * It is encodable in UTF-8 or Latin-1, 7 bytes or less. 14 | * It is alphanumerical, and 10 characters or less (9 if using accented european characters). 15 | * It consists of only upper case, or only lower case characters, including the punctuation characters space, underscore, period, dash, colon, or slash. Then it is allowed to be up to 12 characters. 16 | * It consists of only numerical characters, inlcuding the punctuation characters plus, comma, single quote, space, period, or dash. Then it is allowed to be up to 15 characters. 17 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/TxFinishHook.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction; 21 | 22 | import javax.transaction.Transaction; 23 | 24 | public interface TxFinishHook 25 | { 26 | boolean hasAnyLocks( Transaction tx ); 27 | 28 | void finishTransaction( int eventIdentifier ); 29 | } 30 | -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/CommitCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class CommitCommand extends Command 23 | { 24 | @Override 25 | public void doWork( CommandState state ) 26 | { 27 | state.tx.success(); 28 | state.tx.finish(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/Serializer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import java.io.IOException; 23 | import java.nio.ByteBuffer; 24 | 25 | import org.jboss.netty.buffer.ChannelBuffer; 26 | 27 | public interface Serializer 28 | { 29 | void write( ChannelBuffer buffer, ByteBuffer readBuffer ) throws IOException; 30 | } 31 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/util/IntegerComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo.impl.util; 21 | 22 | import java.util.Comparator; 23 | 24 | public class IntegerComparator implements Comparator 25 | { 26 | public int compare(Integer o1, Integer o2) { 27 | return o1 - o2; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/IllegalStoreVersionException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class IllegalStoreVersionException extends StoreFailureException 23 | { 24 | public IllegalStoreVersionException( String msg ) 25 | { 26 | super( msg ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/BeginTransactionCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class BeginTransactionCommand extends Command 23 | { 24 | @Override 25 | public void doWork( CommandState state ) 26 | { 27 | state.tx = state.graphDb.beginTx(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/Deserializer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import java.io.IOException; 23 | import java.nio.ByteBuffer; 24 | 25 | import org.jboss.netty.buffer.ChannelBuffer; 26 | 27 | public interface Deserializer 28 | { 29 | T read( ChannelBuffer buffer, ByteBuffer temporaryBuffer ) throws IOException; 30 | } 31 | -------------------------------------------------------------------------------- /integration-test/integration/poja/src/main/java/org/neo4j/release/it/poja/ExampleService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.release.it.poja; 21 | 22 | /** 23 | * Public API representing an example OSGi service 24 | */ 25 | public interface ExampleService 26 | { 27 | // public methods go here... 28 | 29 | String scramble( String text ); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /integration-test/integration/osgi/src/main/java/org/neo4j/release/tests/osgi/ExampleService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.release.tests.osgi; 21 | 22 | /** 23 | * Public API representing an example OSGi service 24 | */ 25 | public interface ExampleService 26 | { 27 | // public methods go here... 28 | 29 | String scramble( String text ); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaResource.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction.xaframework; 21 | 22 | import javax.transaction.xa.XAResource; 23 | 24 | public interface XaResource extends XAResource 25 | { 26 | public void setBranchId( byte branchId[] ); 27 | 28 | public byte[] getBranchId(); 29 | } 30 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/util/DoubleAdder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo.impl.util; 21 | 22 | import org.neo4j.graphalgo.CostAccumulator; 23 | 24 | public class DoubleAdder implements CostAccumulator 25 | { 26 | public Double addCosts(Double c1, Double c2) { 27 | return c1 + c2; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/util/IntegerAdder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo.impl.util; 21 | 22 | import org.neo4j.graphalgo.CostAccumulator; 23 | 24 | public class IntegerAdder implements CostAccumulator 25 | { 26 | public Integer addCosts(Integer c1, Integer c2) { 27 | return c1 + c2; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/RollbackCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class RollbackCommand extends Command 23 | { 24 | @Override 25 | public void doWork( CommandState state ) 26 | { 27 | state.tx.failure(); 28 | state.tx.finish(); 29 | state.tx = null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /neo4j/src/site/apt/index.apt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | 3 | This is a meta package containing the most commonly used Neo4j libraries, 4 | which means that it enables you to add these as a single {{{http://maven.apache.org/}Maven}} 5 | dependency in your projects. Using this package, you're also sure that you use 6 | component versions that fit together. 7 | 8 | Included components 9 | 10 | *----+------+------+ 11 | | neo4j-kernel | the neo4j kernel | the neo4j graph database engine | 12 | *----+------+------+ 13 | | neo4j-lucene-index | indexing with Lucene | integration layer between Neo4j and Lucene, for indexing of nodes and relationships | 14 | *----+------+------+ 15 | | neo4j-graph-algo | graph algorithms | graph algorithms like shortest path etc. | 16 | *----+------+------+ 17 | | neo4j-ha | high availability | set up a highly available Neo4j cluster | 18 | *----+------+------+ 19 | | neo4j-management | monitoring and management | management support using JMX | 20 | *----+------+------+ 21 | | neo4j-udc | usage data | usage data collector | 22 | *----+------+------+ 23 | 24 | Usage 25 | 26 | To use this package, add the following dependency to your pom.xml. 27 | 28 | %{source-code|snippet=deps|file=target/extra-resources/pom.xml} 29 | -------------------------------------------------------------------------------- /lucene-index/src/main/java/org/neo4j/index/impl/lucene/EntityType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | import org.apache.lucene.document.Document; 23 | import org.neo4j.graphdb.PropertyContainer; 24 | 25 | interface EntityType 26 | { 27 | Document newDocument( Object entityId ); 28 | 29 | Class getType(); 30 | } 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/OperationType.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | /** 23 | * Defines the two types of operations that can be made to an acquired 24 | * {@link PersistenceWindow}. Operation is either READ or 25 | * WRITE. 26 | */ 27 | public enum OperationType 28 | { 29 | READ, WRITE 30 | } -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/DeadlockDetectedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | /** 23 | * Signals that a deadlock between two or more transactions has been detected. 24 | */ 25 | public class DeadlockDetectedException extends RuntimeException 26 | { 27 | public DeadlockDetectedException( String message ) 28 | { 29 | super( message ); 30 | } 31 | } -------------------------------------------------------------------------------- /backup/src/main/java/org/neo4j/backup/TheBackupInterface.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.backup; 21 | 22 | import org.neo4j.com.Response; 23 | import org.neo4j.com.SlaveContext; 24 | import org.neo4j.com.StoreWriter; 25 | 26 | public interface TheBackupInterface 27 | { 28 | Response fullBackup( StoreWriter writer ); 29 | 30 | Response incrementalBackup( SlaveContext context ); 31 | } 32 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/FailedResponse.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | public class FailedResponse extends Response 23 | { 24 | public FailedResponse() 25 | { 26 | super( null, null, null ); 27 | } 28 | 29 | @Override 30 | public T response() throws MasterFailureException 31 | { 32 | throw new MasterFailureException(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /integration-test/integration/standard/src/test/java/org/neo4j/release/it/std/exec/HelloWorldApp.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.release.it.std.exec; 21 | 22 | /** 23 | */ 24 | public class HelloWorldApp { 25 | 26 | public static void main(String[] args) { 27 | final String subject = ((args.length > 0) ? args[0] : "world"); 28 | System.out.println("hello " + subject); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/persistence/EntityIdGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.persistence; 21 | 22 | public interface EntityIdGenerator 23 | { 24 | long nextId( Class clazz ); 25 | 26 | long getHighestPossibleIdInUse( Class clazz ); 27 | 28 | long getNumberOfIdsInUse( Class clazz ); 29 | 30 | void configure( PersistenceSource source ); 31 | } 32 | -------------------------------------------------------------------------------- /udc/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 1.3.M05 (2011-03-24) 2 | -------------------- 3 | o Removed unnecessary sys out during startup. 4 | 5 | 1.3.M04 (2011-03-10) 6 | -------------------- 7 | o No changes. 8 | 9 | 1.3.M03 (2011-02-24) 10 | ------------------- 11 | o Minor changes related to KernelExtentions refactoring. 12 | 13 | 1.3.M02 (2011-02-10) 14 | ------------------- 15 | o Added possibility to change the source identification via configuration. 16 | 17 | 0.2-1.3.M01 (2011-01-27) 18 | ------------------------ 19 | 20 | o No changes 21 | 22 | 0.1-1.2 (2010-12-29) 23 | -------------------- 24 | 25 | o Improved handling of recoveries. 26 | 27 | 0.1-1.2.M06 (2010-12-21) 28 | ------------------------ 29 | 30 | No changes. 31 | 32 | 0.1-1.2.M05 (2010-12-02) 33 | ------------------------ 34 | 35 | No changes. 36 | 37 | 0.1-1.2.M04 (2010-11-18) 38 | ------------------------ 39 | 40 | No changes. 41 | 42 | 0.1-1.2.M03 (2010-11-04) 43 | ------------------------ 44 | 45 | No changes. 46 | 47 | 0.1-1.2.M02 (2010-10-21) 48 | ------------------------ 49 | 50 | o Fixed an issue where a timer thread was left running, keeping the JVM alive. 51 | 52 | 0.1-1.2.M01 (2010-10-08) 53 | ------------------------ 54 | 55 | o Added a "pinger" as a kernel extension which pings to a server about its existence. 56 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/util/DoubleComparator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo.impl.util; 21 | 22 | import java.util.Comparator; 23 | 24 | public class DoubleComparator implements Comparator 25 | { 26 | public int compare(Double o1, Double o2) { 27 | Double d = o1 - o2; 28 | return d > 0 ? 1 : (d < 0 ? -1 : 0); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/NotUnique.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | import org.neo4j.graphdb.traversal.TraversalBranch; 23 | 24 | class NotUnique extends AbstractUniquenessFilter 25 | { 26 | NotUnique() 27 | { 28 | super( null ); 29 | } 30 | 31 | public boolean check( TraversalBranch source, boolean remember ) 32 | { 33 | return true; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/MappedMemException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | class MappedMemException extends RuntimeException 23 | { 24 | MappedMemException( Throwable cause ) 25 | { 26 | super( cause ); 27 | } 28 | 29 | MappedMemException( String msg, Throwable cause ) 30 | { 31 | super( msg, cause ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /kernel/src/test/java/org/neo4j/kernel/TestVersion.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | import static org.junit.Assert.assertFalse; 23 | 24 | import org.junit.Test; 25 | 26 | public class TestVersion 27 | { 28 | @Test 29 | public void canGetKernelRevision() throws Exception 30 | { 31 | assertFalse( "Kernel revision not specified", "".equals( Version.getKernelRevision() ) ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /udc/src/test/java/org/neo4j/ext/udc/impl/TestUdcExtensionImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.ext.udc.impl; 21 | 22 | import org.neo4j.kernel.KernelExtensionContractTest; 23 | 24 | public class TestUdcExtensionImpl extends KernelExtensionContractTest 25 | { 26 | public TestUdcExtensionImpl() 27 | { 28 | super( UdcExtensionImpl.KEY, UdcExtensionImpl.class ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/IdGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public interface IdGenerator 23 | { 24 | long nextId(); 25 | IdRange nextIdBatch( int size ); 26 | void setHighId( long id ); 27 | long getHighId(); 28 | void freeId( long id ); 29 | void close(); 30 | long getNumberOfIdsInUse(); 31 | long getDefragCount(); 32 | } 33 | -------------------------------------------------------------------------------- /neo4j/src/main/assembly/assembly.xml: -------------------------------------------------------------------------------- 1 | 22 | 23 | javadoc 24 | false 25 | 26 | jar 27 | 28 | 29 | 30 | ${project.build.directory}/site/apidocs 31 | / 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/shortestpath/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * Package containing older implementations of Dijkstra and shortest path, 22 | * where the ones in {@link org.neo4j.graphalgo.GraphAlgoFactory} would be 23 | * a better option. Also contains algorithms, such as {@link FloydWarshall} 24 | * which doesn't scale to bigger graphs. 25 | */ 26 | package org.neo4j.graphalgo.impl.shortestpath; 27 | -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/LockStatus.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha; 21 | 22 | public enum LockStatus 23 | { 24 | OK_LOCKED, 25 | NOT_LOCKED, 26 | DEAD_LOCKED 27 | { 28 | @Override 29 | public boolean hasMessage() 30 | { 31 | return true; 32 | } 33 | }; 34 | 35 | public boolean hasMessage() 36 | { 37 | return false; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ha/src/test/java/slavetest/DoubleLatch.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package slavetest; 21 | 22 | import java.rmi.Remote; 23 | import java.rmi.RemoteException; 24 | 25 | interface DoubleLatch extends Remote 26 | { 27 | void countDownFirst() throws RemoteException; 28 | 29 | void awaitFirst() throws RemoteException; 30 | 31 | void countDownSecond() throws RemoteException; 32 | 33 | void awaitSecond() throws RemoteException; 34 | } -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/zookeeper/ZooKeeperException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha.zookeeper; 21 | 22 | public class ZooKeeperException extends RuntimeException 23 | { 24 | public ZooKeeperException( String message ) 25 | { 26 | super( message ); 27 | } 28 | 29 | public ZooKeeperException( String message, Throwable cause ) 30 | { 31 | super( message, cause ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jmx/src/test/java/org/neo4j/jmx/impl/TestJmxExtension.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.jmx.impl; 21 | 22 | import org.neo4j.jmx.impl.JmxExtension; 23 | import org.neo4j.kernel.KernelExtensionContractTest; 24 | 25 | public class TestJmxExtension extends KernelExtensionContractTest 26 | { 27 | public TestJmxExtension() 28 | { 29 | super( JmxExtension.KEY, JmxExtension.class ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lucene-index/src/main/java/org/neo4j/index/impl/lucene/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /** 21 | * An indexing implementation using 22 | * Apache Lucene 23 | * as backend. Nodes can be indexed using key/value pairs or by full text 24 | * indexing. There is also a batch inserter included for inserting large 25 | * amounts of data. 26 | */ 27 | package org.neo4j.index.impl.lucene; 28 | 29 | -------------------------------------------------------------------------------- /jmx/CHANGES.txt: -------------------------------------------------------------------------------- 1 | o Split up the management component in two, one ("jmx" - this component) with basic support and one ("management") with advanced support. 2 | 3 | 1.3.M05 (2011-03-24) 4 | -------------------- 5 | o No changes. 6 | 7 | 1.3.M04 (2011-03-10) 8 | -------------------- 9 | o No changes. 10 | 11 | 1.3.M03 (2011-02-24) 12 | -------------------- 13 | o Fixed build on windows. 14 | o Minor changes related to KernelExtentions refactoring. 15 | 16 | 1.3.M02 (2011-02-10) 17 | -------------------- 18 | o Fixed a potential NPE. 19 | 20 | 1.3-1.3.M01 (2011-01-27) 21 | ------------------------ 22 | o no changes 23 | 24 | 0.8-1.2 (2010-12-29) 25 | -------------------- 26 | o Made it possible to discover the JMX connection for all servers in the HA cluster through the HighAvailability management bean of one server. 27 | 28 | 0.8-1.2.M06 (2010-12-21) 29 | ------------------------ 30 | o no changes 31 | 32 | 0.8-1.2.M05 (2010-12-02) 33 | ------------------------ 34 | o no changes 35 | 36 | 0.8-1.2.M04 (2010-11-18) 37 | ------------------------ 38 | 39 | o Made it possible to clear cache over JMX (removed faux security check). 40 | 41 | 0.8-1.2.M03 (2010-11-04) 42 | ------------------------ 43 | 44 | o First release as a separate component, this functionality was 45 | included in the neo4j-kernel component previously. 46 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/cache/SoftReferenceQueue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.cache; 21 | 22 | import java.lang.ref.ReferenceQueue; 23 | 24 | public class SoftReferenceQueue extends ReferenceQueue 25 | { 26 | public SoftReferenceQueue() 27 | { 28 | super(); 29 | } 30 | 31 | public SoftValue safePoll() 32 | { 33 | return (SoftValue) poll(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/cache/WeakReferenceQueue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.cache; 21 | 22 | import java.lang.ref.ReferenceQueue; 23 | 24 | public class WeakReferenceQueue extends ReferenceQueue 25 | { 26 | public WeakReferenceQueue() 27 | { 28 | super(); 29 | } 30 | 31 | public WeakValue safePoll() 32 | { 33 | return (WeakValue) poll(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/FileSystemAbstraction.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | import java.io.IOException; 23 | import java.nio.channels.FileChannel; 24 | 25 | public interface FileSystemAbstraction 26 | { 27 | FileChannel open( String fileName, String mode ) throws IOException; 28 | 29 | FileLock tryLock( String fileName, FileChannel channel ) throws IOException; 30 | } 31 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/xa/PropertyIndexEventConsumer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.xa; 21 | 22 | import org.neo4j.kernel.impl.nioneo.store.PropertyIndexData; 23 | 24 | public interface PropertyIndexEventConsumer 25 | { 26 | public void createPropertyIndex( int id, String key ); 27 | 28 | public String getKeyFor( int id ); 29 | 30 | public PropertyIndexData[] getPropertyIndexes( int count ); 31 | } -------------------------------------------------------------------------------- /integration-test/integration/standard/src/test/scala/org/neo4j/release/it/std/smoke/SanitySpec.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.release.it.std.smoke 21 | 22 | import org.specs._ 23 | 24 | /** 25 | * A sanity check that scala specs can 26 | * be resolved and runs normally. 27 | */ 28 | class SanitySpec extends SpecificationWithJUnit { 29 | 30 | "scala specs" should { 31 | "sanely confirm truth" in { 32 | true must beTrue 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/MasterIdGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha; 21 | 22 | import org.neo4j.kernel.CommonFactories.DefaultIdGeneratorFactory; 23 | import org.neo4j.kernel.impl.nioneo.store.NeoStore; 24 | 25 | public class MasterIdGeneratorFactory extends DefaultIdGeneratorFactory 26 | { 27 | @Override 28 | public void updateIdGenerators( NeoStore neoStore ) 29 | { 30 | // Do nothing 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/LogBufferFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction.xaframework; 21 | 22 | import java.io.IOException; 23 | import java.nio.channels.FileChannel; 24 | 25 | public interface LogBufferFactory 26 | { 27 | LogBuffer create( FileChannel fileChannel ) throws IOException; 28 | 29 | FileChannel combine( FileChannel fileChannel, LogBuffer logBuffer ) throws IOException; 30 | } 31 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | 3 | This software is Copyright (c) 2002-2011 "Neo Technology," 4 | Network Engine for Objects in Lund AB [http://neotechnology.com] 5 | 6 | It is licensed under the GNU Affero General Public License version 3 or later, 7 | which in essence means that it's free to embed in other works of free software. 8 | (http://www.fsf.org/licensing/licenses/agpl-3.0.html) 9 | 10 | However, if you're writing non-free (which usually means commercial) software 11 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 12 | (http://neotechnology.com). 13 | 14 | For legalese details, see LICENSE.txt. 15 | 16 | For more information, contact info@neotechnology.com. 17 | 18 | The bundled Apache Geronimo JTA library is copyright 19 | The Apache Software Foundation (http://www.apache.org/) 20 | under the Apache License version 2.0. 21 | 22 | The bundled Lucene text search engine library is copyright 23 | The Apache Software Foundation (http://www.apache.org/) 24 | under the Apache License version 2.0. 25 | 26 | The bundled JLine library is copyright under the 27 | BSD License (http://www.opensource.org/licenses/bsd-license.php). 28 | 29 | The bundled Google Protocol Buffers library is copyright under the 30 | BSD License (http://www.opensource.org/licenses/bsd-license.php). 31 | 32 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/WeightedPath.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo; 21 | 22 | import org.neo4j.graphdb.Path; 23 | 24 | /** 25 | * A {@link Path} that has an associated weight. 26 | * 27 | * @author Tobias Ivarsson 28 | */ 29 | public interface WeightedPath extends Path 30 | { 31 | /** 32 | * Returns the weight of the path. 33 | * 34 | * @return the weight of the path. 35 | */ 36 | double weight(); 37 | } 38 | -------------------------------------------------------------------------------- /kernel/tech-debt.txt: -------------------------------------------------------------------------------- 1 | [2010-02-10] Better testing for broken entries in logical log 2 | Currently the test code for broken entries does not test all possible 3 | combinations of broken entries (meaning crash during write of entry so it 4 | was incomplete). This is fine since a broken command entry will never be 5 | executed because it would then have to have a following prepare entry (can 6 | not happen since we do flush on them). Would however be nice to have code 7 | that tests this so user don't get an exception on recovery. 8 | 9 | [2010-02-25] Bug fix [3933] needs to be merged into 1.0.1 10 | 11 | [2010-02-25] Embedd checksum to logical log 12 | We need to be able to do a checksum on the logical log before applying it 13 | during replication/backup. 14 | 15 | [2010-09-09] Uniform configuration of components 16 | There should be a uniform mechanism for non-programmatic component and 17 | extension configuration (settings for which there is no direct API). 18 | 19 | [2010-09-10] Expose build revision in JMX kernel bean 20 | Now that the revision is available in a public api, it should also 21 | be included in the jmx kernel bean. This will be particularly helpful 22 | for reporting problems (since build revision will be a little more 23 | particular than kernel version). 24 | 25 | -------------------------------------------------------------------------------- /lucene-index/src/main/java/org/neo4j/index/lucene/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | /** 22 | * Contains {@link org.neo4j.index.lucene.QueryContext} and 23 | * {@link org.neo4j.index.lucene.ValueContext} which is part of the 24 | * public API for an {@link org.neo4j.graphdb.index.Index} backed by Lucene. 25 | * 26 | * Also contain a timeline implementation on top of an 27 | * {@link org.neo4j.graphdb.index.Index} based on Lucene. 28 | */ 29 | package org.neo4j.index.lucene; 30 | -------------------------------------------------------------------------------- /neo4j/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Neo4j 2 | 3 | This software is Copyright (c) 2002-2011 "Neo Technology," 4 | Network Engine for Objects in Lund AB [http://neotechnology.com] 5 | 6 | It is licensed under the GNU Affero General Public License version 3 or later, 7 | which in essence means that it's free to embed in other works of free software. 8 | (http://www.fsf.org/licensing/licenses/agpl-3.0.html) 9 | 10 | However, if you're writing non-free (which usually means commercial) software 11 | and wish to use Neo4j, then you must buy a commercial license from Neo Technology 12 | (http://neotechnology.com). 13 | 14 | For legalese details, see LICENSE.txt. 15 | 16 | For more information, contact info@neotechnology.com. 17 | 18 | The bundled Apache Geronimo JTA library is copyright 19 | The Apache Software Foundation (http://www.apache.org/) 20 | under the Apache License version 2.0. 21 | 22 | The bundled Lucene text search engine library is copyright 23 | The Apache Software Foundation (http://www.apache.org/) 24 | under the Apache License version 2.0. 25 | 26 | The bundled JLine library is copyright under the 27 | BSD License (http://www.opensource.org/licenses/bsd-license.php). 28 | 29 | The bundled Google Protocol Buffers library is copyright under the 30 | BSD License (http://www.opensource.org/licenses/bsd-license.php). 31 | 32 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/event/ErrorState.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphdb.event; 21 | 22 | /** 23 | * An object that describes a state from which a Neo4j Graph Database cannot 24 | * continue. 25 | * 26 | * @author Tobias Ivarsson 27 | */ 28 | public enum ErrorState 29 | { 30 | /** 31 | * The Graph Database failed since the storage media where the graph 32 | * database data is stored is full and cannot be written to. 33 | */ 34 | STORAGE_MEDIA_FULL, 35 | } 36 | -------------------------------------------------------------------------------- /kernel/src/test/java/org/neo4j/kernel/OtherExtension.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | 23 | public class OtherExtension extends KernelExtension 24 | { 25 | static final String EXTENSION_ID = "other dummy"; 26 | 27 | public OtherExtension() 28 | { 29 | super( EXTENSION_ID ); 30 | } 31 | 32 | @Override 33 | protected DummyExtension.State load( KernelData kernel ) 34 | { 35 | return new DummyExtension.State(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/ResponseReceiver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha; 21 | 22 | import org.neo4j.com.Response; 23 | import org.neo4j.com.SlaveContext; 24 | import org.neo4j.helpers.Pair; 25 | import org.neo4j.kernel.ha.zookeeper.Machine; 26 | 27 | public interface ResponseReceiver 28 | { 29 | SlaveContext getSlaveContext( int eventIdentifier ); 30 | 31 | T receive( Response response ); 32 | 33 | void newMaster( Pair master, Exception e ); 34 | } 35 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/helpers/Predicate.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.helpers; 21 | 22 | /** 23 | * Predicate useful for filtering. 24 | * 25 | * @param type of items 26 | */ 27 | public interface Predicate 28 | { 29 | /** 30 | * @return whether or not to accept the {@code item}, where {@code true} 31 | * means that the {@code item} is accepted and {@code false} means that 32 | * it's not (i.e. didn't pass the filter). 33 | */ 34 | boolean accept( T item ); 35 | } 36 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/graphdb/TransactionFailureException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphdb; 21 | 22 | /** 23 | * Signals that a transaction failed and has been rolled back. 24 | */ 25 | public class TransactionFailureException extends RuntimeException 26 | { 27 | public TransactionFailureException( String msg ) 28 | { 29 | super( msg ); 30 | } 31 | 32 | public TransactionFailureException( String msg, Throwable cause ) 33 | { 34 | super( msg, cause ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/IdGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel; 21 | 22 | import org.neo4j.kernel.impl.nioneo.store.IdGenerator; 23 | import org.neo4j.kernel.impl.nioneo.store.NeoStore; 24 | 25 | public interface IdGeneratorFactory 26 | { 27 | IdGenerator open( String fileName, int grabSize, IdType idType, long highestIdInUse ); 28 | 29 | void create( String fileName ); 30 | 31 | IdGenerator get( IdType idType ); 32 | 33 | void updateIdGenerators( NeoStore store ); 34 | } 35 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/PlainPersistenceWindow.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | import java.nio.ByteBuffer; 23 | import java.nio.channels.FileChannel; 24 | 25 | class PlainPersistenceWindow extends AbstractPersistenceWindow 26 | { 27 | PlainPersistenceWindow( long position, int recordSize, int totalSize, 28 | FileChannel channel ) 29 | { 30 | super( position, recordSize, totalSize, channel, 31 | ByteBuffer.allocate( totalSize ) ); 32 | } 33 | } -------------------------------------------------------------------------------- /management/src/main/java/org/neo4j/management/XaManager.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.management; 21 | 22 | import org.neo4j.jmx.Description; 23 | import org.neo4j.jmx.ManagementInterface; 24 | 25 | @ManagementInterface( name = XaManager.NAME ) 26 | @Description( "Information about the XA transaction manager" ) 27 | public interface XaManager 28 | { 29 | final String NAME = "XA Resources"; 30 | 31 | @Description( "Information about all XA resources managed by the transaction manager" ) 32 | XaResourceInfo[] getXaResources(); 33 | } 34 | -------------------------------------------------------------------------------- /ha/src/docs/dev/architecture.txt: -------------------------------------------------------------------------------- 1 | [[ha-architecture]] 2 | Architecture 3 | ============ 4 | 5 | Neo4j HA has been designed to make the transition from single machine to multi machine operation simple, by not having to change the already existing application. 6 | 7 | Consider an existing application with Neo4j embedded and running on a single machine. 8 | To deploy such an application in a multi machine setup the only required change is to switch the creation of the +GraphDatabaseService+ from +EmbeddedGraphDatabase+ to +HighlyAvailableGraphDatabase+. 9 | Since both implement the same interface, no additional changes are required. 10 | 11 | .Typical setup when running multiple Neo4j instances in HA mode 12 | image::ha2.png[scaledwidth="100%", alt="Neo4j Highly Available Cluster"] 13 | 14 | When running Neo4j in HA mode there is always a single master and zero or more slaves. 15 | Compared to other master-slave replication setups Neo4j HA can handle writes on a slave so there is no need to redirect writes to the master. 16 | 17 | A slave will handle writes by synchronizing with the master to preserve consistency. 18 | Updates will however propagate from the master to other slaves eventually so a write from one slave is not immediately visible on all other slaves. 19 | This is the only difference between multiple machines running in HA mode compared to single machine operation. 20 | All other ACID characteristics are the same. 21 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/DirectPersistenceWindow.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | import java.nio.ByteBuffer; 23 | import java.nio.channels.FileChannel; 24 | 25 | class DirectPersistenceWindow extends AbstractPersistenceWindow 26 | { 27 | DirectPersistenceWindow( long position, int recordSize, int totalSize, 28 | FileChannel channel ) 29 | { 30 | super( position, recordSize, totalSize, channel, 31 | ByteBuffer.allocateDirect( totalSize ) ); 32 | } 33 | } -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/impl/path/AllSimplePaths.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo.impl.path; 21 | 22 | import org.neo4j.graphdb.RelationshipExpander; 23 | import org.neo4j.kernel.Uniqueness; 24 | 25 | public class AllSimplePaths extends AllPaths 26 | { 27 | public AllSimplePaths( int maxDepth, RelationshipExpander expander ) 28 | { 29 | super( maxDepth, expander ); 30 | } 31 | 32 | @Override 33 | protected Uniqueness uniqueness() 34 | { 35 | return Uniqueness.NODE_PATH; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/core/RelationshipTypeCreator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.core; 21 | 22 | import javax.transaction.TransactionManager; 23 | 24 | import org.neo4j.kernel.impl.persistence.EntityIdGenerator; 25 | import org.neo4j.kernel.impl.persistence.PersistenceManager; 26 | 27 | public interface RelationshipTypeCreator 28 | { 29 | int getOrCreate( TransactionManager txManager, EntityIdGenerator idGenerator, 30 | PersistenceManager persistence, RelationshipTypeHolder relTypeHolder, String name ); 31 | } 32 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/StoreFailureException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public abstract class StoreFailureException extends RuntimeException 23 | { 24 | public StoreFailureException( String msg ) 25 | { 26 | super( msg ); 27 | } 28 | 29 | public StoreFailureException( Throwable cause ) 30 | { 31 | super( cause ); 32 | } 33 | 34 | public StoreFailureException( String msg, Throwable cause ) 35 | { 36 | super( msg, cause ); 37 | } 38 | } -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/ComException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | public class ComException extends RuntimeException 23 | { 24 | public ComException() 25 | { 26 | super(); 27 | } 28 | 29 | public ComException( String message, Throwable cause ) 30 | { 31 | super( message, cause ); 32 | } 33 | 34 | public ComException( String message ) 35 | { 36 | super( message ); 37 | } 38 | 39 | public ComException( Throwable cause ) 40 | { 41 | super( cause ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/core/PropertyEventData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.core; 21 | 22 | class PropertyEventData 23 | { 24 | private final String key; 25 | private final Object value; 26 | 27 | public PropertyEventData( String key, Object value ) 28 | { 29 | this.key = key; 30 | this.value = value; 31 | } 32 | 33 | public String getKey() 34 | { 35 | return key; 36 | } 37 | 38 | public Object getValue() 39 | { 40 | return value; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/InvalidRecordException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class InvalidRecordException extends StoreFailureException 23 | { 24 | public InvalidRecordException( String msg ) 25 | { 26 | super( msg ); 27 | } 28 | 29 | public InvalidRecordException( Throwable cause ) 30 | { 31 | super( cause ); 32 | } 33 | 34 | public InvalidRecordException( String msg, Throwable cause ) 35 | { 36 | super( msg, cause ); 37 | } 38 | } -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/ReadPastEndException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction.xaframework; 21 | 22 | import java.nio.ByteBuffer; 23 | import java.nio.channels.ReadableByteChannel; 24 | 25 | /** 26 | * Thrown when reading from a {@link ReadableByteChannel} into a buffer 27 | * and not enough bytes ({@link ByteBuffer#limit()}) could be read. 28 | */ 29 | public class ReadPastEndException extends Exception 30 | { 31 | public ReadPastEndException() 32 | { 33 | super(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /backup/src/test/java/org/neo4j/backup/TestExtensions.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.backup; 21 | 22 | import static org.junit.Assert.assertEquals; 23 | 24 | import org.junit.Test; 25 | 26 | public class TestExtensions 27 | { 28 | 29 | @Test 30 | public void testLoadDummyOk() throws Exception 31 | { 32 | assertEquals( 125, 33 | TestBackupToolEmbedded.runBackupToolFromOtherJvmToGetExitCode( 34 | "-full", "-from", "exit://localhost:125", "-to", 35 | "foobar/123" ) ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/RelationshipTypeData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class RelationshipTypeData 23 | { 24 | private final String name; 25 | private final int id; 26 | 27 | public RelationshipTypeData( int id, String name ) 28 | { 29 | this.id = id; 30 | this.name = name; 31 | } 32 | 33 | public int getId() 34 | { 35 | return this.id; 36 | } 37 | 38 | public String getName() 39 | { 40 | return this.name; 41 | } 42 | } -------------------------------------------------------------------------------- /lucene-index/src/test/java/org/neo4j/index/impl/lucene/RemoveFromIndexCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.index.impl.lucene; 21 | 22 | public class RemoveFromIndexCommand extends Command 23 | { 24 | private String key; 25 | private String value; 26 | 27 | public RemoveFromIndexCommand( String key, String value ) 28 | { 29 | this.key = key; 30 | this.value = value; 31 | } 32 | 33 | @Override 34 | public void doWork( CommandState state ) 35 | { 36 | state.index.remove( state.node, key, value ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ha/src/main/java/org/neo4j/kernel/ha/ZooKeeperLastCommittedTxIdSetter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.ha; 21 | 22 | import org.neo4j.kernel.impl.core.LastCommittedTxIdSetter; 23 | 24 | public class ZooKeeperLastCommittedTxIdSetter implements LastCommittedTxIdSetter 25 | { 26 | private final Broker broker; 27 | 28 | public ZooKeeperLastCommittedTxIdSetter( Broker broker ) 29 | { 30 | this.broker = broker; 31 | } 32 | 33 | public void setLastCommittedTxId( long txId ) 34 | { 35 | broker.setLastCommittedTxId( txId ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/PropertyIndexData.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class PropertyIndexData 23 | { 24 | private final int keyId; 25 | private final String value; 26 | 27 | public PropertyIndexData( int keyId, String value ) 28 | { 29 | this.keyId = keyId; 30 | this.value = value; 31 | } 32 | 33 | public int getKeyId() 34 | { 35 | return this.keyId; 36 | } 37 | 38 | public String getValue() 39 | { 40 | return this.value; 41 | } 42 | } -------------------------------------------------------------------------------- /kernel/src/test/java/org/neo4j/test/TargetDirectoryTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.test; 21 | 22 | import static org.junit.Assert.assertNotNull; 23 | 24 | import org.junit.Rule; 25 | import org.junit.Test; 26 | 27 | public class TargetDirectoryTest 28 | { 29 | private static final TargetDirectory target = TargetDirectory.forTest( TargetDirectoryTest.class ); 30 | 31 | public @Rule TargetDirectory.TestDirectory dir = target.testDirectory(); 32 | 33 | @Test 34 | public void hasDir() throws Exception 35 | { 36 | assertNotNull( dir ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /jmx/src/main/java/org/neo4j/jmx/ManagementInterface.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.jmx; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * Marks that an interface is a Neo4j management interface. 29 | * 30 | * @author Tobias Ivarsson 31 | */ 32 | @Target( ElementType.TYPE ) 33 | @Retention( RetentionPolicy.RUNTIME ) 34 | public @interface ManagementInterface 35 | { 36 | String name(); 37 | } 38 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/UnderlyingStorageException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class UnderlyingStorageException extends StoreFailureException 23 | { 24 | public UnderlyingStorageException( String msg ) 25 | { 26 | super( msg ); 27 | } 28 | 29 | public UnderlyingStorageException( Throwable cause ) 30 | { 31 | super( cause ); 32 | } 33 | 34 | public UnderlyingStorageException( String msg, Throwable cause ) 35 | { 36 | super( msg, cause ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/InvalidIdGeneratorException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.nioneo.store; 21 | 22 | public class InvalidIdGeneratorException extends StoreFailureException 23 | { 24 | public InvalidIdGeneratorException( String msg ) 25 | { 26 | super( msg ); 27 | } 28 | 29 | public InvalidIdGeneratorException( Throwable cause ) 30 | { 31 | super( cause ); 32 | } 33 | 34 | public InvalidIdGeneratorException( String msg, Throwable cause ) 35 | { 36 | super( msg, cause ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/persistence/ResourceAcquisitionFailedException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.persistence; 21 | 22 | /** 23 | * Thrown if the {@link ResourceBroker} is unable to acquire a resource for a 24 | * certain set of parameters. 25 | */ 26 | class ResourceAcquisitionFailedException extends RuntimeException 27 | { 28 | ResourceAcquisitionFailedException( String s ) 29 | { 30 | super( s ); 31 | } 32 | 33 | ResourceAcquisitionFailedException( String s, Throwable cause ) 34 | { 35 | super( s, cause ); 36 | } 37 | } -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/cache/SoftValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.cache; 21 | 22 | import java.lang.ref.ReferenceQueue; 23 | import java.lang.ref.SoftReference; 24 | 25 | public class SoftValue extends SoftReference 26 | { 27 | public final K key; 28 | 29 | public SoftValue( K key, V value, ReferenceQueue queue ) 30 | { 31 | super( value, queue ); 32 | this.key = key; 33 | } 34 | 35 | public SoftValue( K key, V value ) 36 | { 37 | super( value ); 38 | this.key = key; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/cache/WeakValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.cache; 21 | 22 | import java.lang.ref.ReferenceQueue; 23 | import java.lang.ref.WeakReference; 24 | 25 | public class WeakValue extends WeakReference 26 | { 27 | public final K key; 28 | 29 | public WeakValue( K key, V value, ReferenceQueue queue ) 30 | { 31 | super( value, queue ); 32 | this.key = key; 33 | } 34 | 35 | public WeakValue( K key, V value ) 36 | { 37 | super( value ); 38 | this.key = key; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/LockException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction; 21 | 22 | public class LockException extends RuntimeException 23 | { 24 | public LockException() 25 | { 26 | super(); 27 | } 28 | 29 | public LockException( String message ) 30 | { 31 | super( message ); 32 | } 33 | 34 | public LockException( String message, Throwable cause ) 35 | { 36 | super( message, cause ); 37 | } 38 | 39 | public LockException( Throwable cause ) 40 | { 41 | super( cause ); 42 | } 43 | } -------------------------------------------------------------------------------- /kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/TxIdGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.kernel.impl.transaction.xaframework; 21 | 22 | import javax.transaction.TransactionManager; 23 | 24 | public interface TxIdGeneratorFactory 25 | { 26 | public static final TxIdGeneratorFactory DEFAULT = new TxIdGeneratorFactory() 27 | { 28 | public TxIdGenerator create( final TransactionManager txManager ) 29 | { 30 | return TxIdGenerator.DEFAULT; 31 | } 32 | }; 33 | 34 | TxIdGenerator create( TransactionManager txManager ); 35 | } 36 | -------------------------------------------------------------------------------- /management/src/main/java/org/neo4j/management/MemoryMapping.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.management; 21 | 22 | import org.neo4j.jmx.Description; 23 | import org.neo4j.jmx.ManagementInterface; 24 | 25 | @ManagementInterface( name = MemoryMapping.NAME ) 26 | @Description( "The status of Neo4j memory mapping" ) 27 | public interface MemoryMapping 28 | { 29 | final String NAME = "Memory Mapping"; 30 | 31 | @Description( "Get information about each pool of memory mapped regions from store files with " 32 | + "memory mapping enabled" ) 33 | WindowPoolInfo[] getMemoryPools(); 34 | } 35 | -------------------------------------------------------------------------------- /kernel/design-discussions.txt: -------------------------------------------------------------------------------- 1 | Interaction points 2 | ================== 3 | * Acquire lock 4 | * Allocate ID range 5 | * Commit transaction 6 | * Rollback transaction (release locks) 7 | * Slave pull 8 | 9 | All responses have the possibility to return a number of transaction logs. 10 | 11 | 12 | Aquire lock responses 13 | --------------------- 14 | * ok, locked 15 | * deadlock detected 16 | * recoverable failure 17 | Master sends transaction logs and client either realizes that the resource 18 | is not lockable (removed) or that it could make a new locking attempt. 19 | * nonrecoverable failure 20 | Transaction fails. Typically the master has died since the last sync, and 21 | we now have a new (or restarted) master. All transactions from before the 22 | last syncup are now invalid, since their locks are not held by the master. 23 | 24 | 25 | Allocate ID range 26 | ----------------- 27 | 28 | 29 | Commit transaction 30 | ------------------ 31 | 32 | 33 | Rollback transaction 34 | -------------------- 35 | 36 | 37 | Slave pull 38 | ---------- 39 | 40 | 41 | Features still missing 42 | ====================== 43 | * How does a new master know if a client has had a transaction opened before or 44 | not? How do we differentiate from the first lock in a transaction and the 45 | rest of them? 46 | 47 | 48 | Locking sequence 49 | ================ 50 | 1. Acquire local lock 51 | 2. Acquire lock at master 52 | If fail: release local lock 53 | If success: proceed 54 | 55 | -------------------------------------------------------------------------------- /graph-algo/src/main/java/org/neo4j/graphalgo/MaxCostEvaluator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.graphalgo; 21 | 22 | /** 23 | * Evaluator for determining if the maximum path cost has been exceeded. 24 | * 25 | * @author Peter Neubauer 26 | * @param The cost value type 27 | */ 28 | public interface MaxCostEvaluator 29 | { 30 | /** 31 | * Evaluates whether the maximum cost has been exceeded. 32 | * 33 | * @param currentCost the cost to be checked 34 | * @return true if the maximum Cost is less that currentCost 35 | */ 36 | public boolean maxCostExceeded( T currentCost ); 37 | } 38 | -------------------------------------------------------------------------------- /ha/src/test/java/org/neo4j/ha/CreateEmptyDb.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.ha; 21 | 22 | import java.io.File; 23 | 24 | import org.junit.Ignore; 25 | import org.neo4j.kernel.EmbeddedGraphDatabase; 26 | 27 | @Ignore 28 | public class CreateEmptyDb 29 | { 30 | public static void main( String[] args ) 31 | { 32 | at( args[0] ); 33 | } 34 | 35 | public static void at( String storeDir ) 36 | { 37 | new EmbeddedGraphDatabase( storeDir ).shutdown(); 38 | } 39 | 40 | public static void at( File storeDir ) 41 | { 42 | at( storeDir.getAbsolutePath() ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /com/src/main/java/org/neo4j/com/StoreWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2011 "Neo Technology," 3 | * Network Engine for Objects in Lund AB [http://neotechnology.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as 9 | * published by the Free Software Foundation, either version 3 of the 10 | * License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | */ 20 | package org.neo4j.com; 21 | 22 | import java.io.IOException; 23 | import java.nio.ByteBuffer; 24 | import java.nio.channels.ReadableByteChannel; 25 | 26 | public interface StoreWriter 27 | { 28 | // "hasData" is an effect of the block format not supporting a zero length block 29 | // whereas a neostore file may actually be 0 bytes we'll have to keep track 30 | // of that special case. 31 | void write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData ) 32 | throws IOException; 33 | 34 | void done(); 35 | } 36 | --------------------------------------------------------------------------------