-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fuseki init. Split code out of constants class. Name fuseki/main init…
… as InitFusekiMain
- Loading branch information
Showing
17 changed files
with
113 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiCore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.jena.fuseki.system; | ||
|
||
import org.apache.jena.fuseki.Fuseki; | ||
import org.apache.jena.sparql.util.MappingRegistry; | ||
import org.apache.jena.sys.JenaSystem; | ||
import org.apache.jena.tdb1.TDB1; | ||
import org.apache.jena.tdb1.transaction.TransactionManager; | ||
|
||
/** | ||
* Fuseki core initialization. | ||
* <p> | ||
* Initialize an instance of the Fuseki server core code.. | ||
* This is not done via Jena's initialization mechanism | ||
* but done explicitly to give control. | ||
* <p> | ||
* It is done after Jena initializes. | ||
* <p> | ||
* {@code InitFusekiMain} is the code for Jena's initialization mechanism. | ||
* It calls this class. | ||
*/ | ||
public class FusekiCore { | ||
|
||
private static boolean initialized = false; | ||
|
||
public synchronized static void init() { | ||
if ( initialized ) | ||
return; | ||
|
||
// Avoid re-entrancy. | ||
initialized = true; | ||
|
||
JenaSystem.init(); | ||
// Touch the Fuseki class to make sure statics get initialized. | ||
Fuseki.initConsts(); | ||
MappingRegistry.addPrefixMapping("fuseki", Fuseki.FusekiSymbolIRI); | ||
|
||
// TDB1 | ||
TDB1.setOptimizerWarningFlag(false); | ||
// Don't use TDB1 batch commits. | ||
// This can be slower, but it less memory hungry and more predictable. | ||
TransactionManager.QueueBatchSize = 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,3 @@ public void execute(HttpAction action) { | |
FusekiLib.reload(server, model); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...seki-main/src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
org.apache.jena.fuseki.main.sys.InitFuseki | ||
org.apache.jena.fuseki.main.sys.InitFusekiMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.