本文整理了Java中org.neo4j.kernel.internal.Version.getNeo4jVersion()
方法的一些代码示例,展示了Version.getNeo4jVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getNeo4jVersion()
方法的具体详情如下:
包路径:org.neo4j.kernel.internal.Version
类名称:Version
方法名:getNeo4jVersion
暂无
代码示例来源:origin: neo4j/neo4j
UnexpectedUpgradingStoreVersionException( String fileVersion, String currentVersion )
{
super( String.format( MESSAGE, fileVersion, currentVersion, Version.getNeo4jVersion() ) );
}
}
代码示例来源:origin: neo4j/neo4j
public BoltStateMachineV1SPI( UsageData usageData, LogService logging,
Authentication authentication, TransactionStateMachineSPI transactionStateMachineSPI )
{
this.usageData = usageData;
this.errorReporter = new ErrorReporter( logging );
this.authentication = authentication;
this.transactionSpi = transactionStateMachineSPI;
this.version = BOLT_SERVER_VERSION_PREFIX + Version.getNeo4jVersion();
}
代码示例来源:origin: neo4j/neo4j
private static String manualReference( ManualPage page, Anchor anchor )
{
// Docs are versioned major.minor-suffix, so drop the patch version.
String[] versionParts = Version.getNeo4jVersion().split("-");
versionParts[0] = versionParts[0].substring(0, 3);
String docsVersion = String.join("-", versionParts);
return " https://neo4j.com/docs/operations-manual/" + docsVersion + "/" +
page.getReference( anchor );
}
代码示例来源:origin: neo4j/neo4j
private static void publishPlatformInfo( UsageData sysInfo )
{
sysInfo.set( UsageDataKeys.version, Version.getNeo4jVersion() );
sysInfo.set( UsageDataKeys.revision, Version.getKernelVersion() );
}
代码示例来源:origin: neo4j/neo4j
static void printOverview( File storeDir, Collection<Option<File[]>> nodesFiles,
Collection<Option<File[]>> relationshipsFiles,
org.neo4j.unsafe.impl.batchimport.Configuration configuration, PrintStream out )
{
out.println( "Neo4j version: " + Version.getNeo4jVersion() );
out.println( "Importing the contents of these files into " + storeDir + ":" );
printInputFiles( "Nodes", nodesFiles, out );
printInputFiles( "Relationships", relationshipsFiles, out );
out.println();
out.println( "Available resources:" );
printIndented( "Total machine memory: " + bytes( OsBeanUtil.getTotalPhysicalMemory() ), out );
printIndented( "Free machine memory: " + bytes( OsBeanUtil.getFreePhysicalMemory() ), out );
printIndented( "Max heap memory : " + bytes( Runtime.getRuntime().maxMemory() ), out );
printIndented( "Processors: " + configuration.maxNumberOfProcessors(), out );
printIndented( "Configured max memory: " + bytes( configuration.maxMemoryUsage() ), out );
printIndented( "High-IO: " + configuration.highIO(), out );
out.println();
}
代码示例来源:origin: neo4j/neo4j
@Test
public void listAllComponents() throws Throwable
{
// Given a running database
// When
RawIterator<Object[],ProcedureException> stream =
procs().procedureCallRead( procs().procedureGet( procedureName( "dbms", "components" ) ).id(), new Object[0] );
// Then
assertThat( asList( stream ), contains( equalTo( new Object[]{"Neo4j Kernel", singletonList( Version.getNeo4jVersion() ), "community"} ) ) );
commit();
}
代码示例来源:origin: neo4j/neo4j
@Test
void shouldHandleHelloMessage() throws Throwable
{
// Given
BoltStateMachineV3 machine = newStateMachine();
BoltResponseRecorder recorder = new BoltResponseRecorder();
// When
machine.process( newHelloMessage(), recorder );
// Then
RecordedBoltResponse response = recorder.nextResponse();
assertThat( response, succeededWithMetadata( "server", BOLT_SERVER_VERSION_PREFIX + Version.getNeo4jVersion() ) );
assertThat( response, succeededWithMetadata( "connection_id", "conn-v3-test-boltchannel-id" ) );
assertThat( machine.state(), instanceOf( ReadyState.class ) );
}
代码示例来源:origin: neo4j/neo4j
@Override
protected void serialize( MappingSerializer serializer )
{
serializer.putRelativeUri( "node", PATH_NODES );
serializer.putRelativeUri( "relationship", PATH_RELATIONSHIPS );
serializer.putRelativeUri( "node_index", PATH_NODE_INDEX );
serializer.putRelativeUri( "relationship_index", PATH_RELATIONSHIP_INDEX );
serializer.putRelativeUri( "extensions_info", PATH_EXTENSIONS );
serializer.putRelativeUri( "relationship_types", PATH_RELATIONSHIP_TYPES );
serializer.putRelativeUri( "batch", PATH_BATCH );
serializer.putRelativeUri( "cypher", PATH_CYPHER );
serializer.putRelativeUri( "indexes", PATH_SCHEMA_INDEX );
serializer.putRelativeUri( "constraints", PATH_SCHEMA_CONSTRAINT );
serializer.putRelativeUri( "transaction", PATH_TRANSACTION );
serializer.putRelativeUri( "node_labels", PATH_LABELS );
serializer.putString( "neo4j_version", Version.getNeo4jVersion() );
}
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldGiveKernelVersionOnInit() throws Throwable
{
// Given it is important for client applications to programmatically
// identify expired credentials as the cause of not being authenticated
BoltStateMachine machine = env.newMachine( BOLT_CHANNEL );
BoltResponseRecorder recorder = new BoltResponseRecorder();
String version = "Neo4j/" + Version.getNeo4jVersion();
// When
InitMessage init = new InitMessage( USER_AGENT, newBasicAuthToken( "neo4j", "neo4j" ) );
machine.process( init, recorder );
machine.process( new RunMessage( "CREATE ()", EMPTY_MAP ), recorder );
// Then
assertThat( recorder.nextResponse(), succeededWithMetadata( "server", stringValue( version ) ) );
}
代码示例来源:origin: neo4j/neo4j
@Test
public void shouldPrintReferenceLinkOnDataImportErrors()
String[] versionParts = Version.getNeo4jVersion().split("-");
versionParts[0] = versionParts[0].substring(0, 3);
String docsVersion = String.join("-", versionParts);
代码示例来源:origin: neo4j/neo4j
assertNotNull( map.get( "constraints" ) );
assertNotNull( map.get( "node_labels" ) );
assertEquals( Version.getNeo4jVersion(), map.get( "neo4j_version" ) );
代码示例来源:origin: neo4j/neo4j
new Procedures( facade, new SpecialBuiltInProcedures( Version.getNeo4jVersion(), platform.databaseInfo.edition.toString() ), pluginDir,
internalLog, procedureConfig );
platform.life.add( procedures );
代码示例来源:origin: org.neo4j/neo4j-security-enterprise
@Override
public String neo4jVersion()
{
return Version.getNeo4jVersion();
}
代码示例来源:origin: org.neo4j/neo4j-kernel
UnexpectedUpgradingStoreVersionException( String fileVersion, String currentVersion )
{
super( String.format( MESSAGE, fileVersion, currentVersion, Version.getNeo4jVersion() ) );
}
}
代码示例来源:origin: org.neo4j/neo4j-import-tool
private static String manualReference( ManualPage page, Anchor anchor )
{
// Docs are versioned major.minor-suffix, so drop the patch version.
String[] versionParts = Version.getNeo4jVersion().split("-");
versionParts[0] = versionParts[0].substring(0, 3);
String docsVersion = String.join("-", versionParts);
return " https://neo4j.com/docs/operations-manual/" + docsVersion + "/" +
page.getReference( anchor );
}
代码示例来源:origin: org.neo4j/neo4j-bolt
public BoltStateMachineV1SPI( UsageData usageData, LogService logging,
Authentication authentication, TransactionStateMachineSPI transactionStateMachineSPI )
{
this.usageData = usageData;
this.errorReporter = new ErrorReporter( logging );
this.authentication = authentication;
this.transactionSpi = transactionStateMachineSPI;
this.version = BOLT_SERVER_VERSION_PREFIX + Version.getNeo4jVersion();
}
代码示例来源:origin: org.neo4j/neo4j
private static void publishPlatformInfo( UsageData sysInfo )
{
sysInfo.set( UsageDataKeys.version, Version.getNeo4jVersion() );
sysInfo.set( UsageDataKeys.revision, Version.getKernelVersion() );
}
代码示例来源:origin: org.neo4j/neo4j-import-tool
static void printOverview( File storeDir, Collection<Option<File[]>> nodesFiles,
Collection<Option<File[]>> relationshipsFiles,
org.neo4j.unsafe.impl.batchimport.Configuration configuration, PrintStream out )
{
out.println( "Neo4j version: " + Version.getNeo4jVersion() );
out.println( "Importing the contents of these files into " + storeDir + ":" );
printInputFiles( "Nodes", nodesFiles, out );
printInputFiles( "Relationships", relationshipsFiles, out );
out.println();
out.println( "Available resources:" );
printIndented( "Total machine memory: " + bytes( OsBeanUtil.getTotalPhysicalMemory() ), out );
printIndented( "Free machine memory: " + bytes( OsBeanUtil.getFreePhysicalMemory() ), out );
printIndented( "Max heap memory : " + bytes( Runtime.getRuntime().maxMemory() ), out );
printIndented( "Processors: " + configuration.maxNumberOfProcessors(), out );
printIndented( "Configured max memory: " + bytes( configuration.maxMemoryUsage() ), out );
printIndented( "High-IO: " + configuration.highIO(), out );
out.println();
}
代码示例来源:origin: org.neo4j.app/neo4j-server
@Override
protected void serialize( MappingSerializer serializer )
{
serializer.putRelativeUri( "node", PATH_NODES );
serializer.putRelativeUri( "relationship", PATH_RELATIONSHIPS );
serializer.putRelativeUri( "node_index", PATH_NODE_INDEX );
serializer.putRelativeUri( "relationship_index", PATH_RELATIONSHIP_INDEX );
serializer.putRelativeUri( "extensions_info", PATH_EXTENSIONS );
serializer.putRelativeUri( "relationship_types", PATH_RELATIONSHIP_TYPES );
serializer.putRelativeUri( "batch", PATH_BATCH );
serializer.putRelativeUri( "cypher", PATH_CYPHER );
serializer.putRelativeUri( "indexes", PATH_SCHEMA_INDEX );
serializer.putRelativeUri( "constraints", PATH_SCHEMA_CONSTRAINT );
serializer.putRelativeUri( "transaction", PATH_TRANSACTION );
serializer.putRelativeUri( "node_labels", PATH_LABELS );
serializer.putString( "neo4j_version", Version.getNeo4jVersion() );
}
}
代码示例来源:origin: org.neo4j/neo4j
new Procedures( facade, new SpecialBuiltInProcedures( Version.getNeo4jVersion(), platform.databaseInfo.edition.toString() ), pluginDir,
internalLog, procedureConfig );
platform.life.add( procedures );
内容来源于网络,如有侵权,请联系作者删除!