-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b495ff
commit cecc1fc
Showing
10 changed files
with
238 additions
and
198 deletions.
There are no files selected for viewing
67 changes: 37 additions & 30 deletions
67
core/src/main/java/com/orientechnologies/orient/core/engine/OEngineAbstract.java
100644 → 100755
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,43 +1,50 @@ | ||
/* | ||
* | ||
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) | ||
* * | ||
* * Licensed under the Apache License, Version 2.0 (the "License"); | ||
* * you may not use this file except in compliance with the License. | ||
* * You may obtain a copy of the License at | ||
* * | ||
* * http://www.apache.org/licenses/LICENSE-2.0 | ||
* * | ||
* * Unless required by applicable law or agreed to in writing, software | ||
* * distributed under the License is distributed on an "AS IS" BASIS, | ||
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* * See the License for the specific language governing permissions and | ||
* * limitations under the License. | ||
* * | ||
* * For more information: http://www.orientechnologies.com | ||
* | ||
*/ | ||
* | ||
* * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) | ||
* * | ||
* * Licensed under the Apache License, Version 2.0 (the "License"); | ||
* * you may not use this file except in compliance with the License. | ||
* * You may obtain a copy of the License at | ||
* * | ||
* * http://www.apache.org/licenses/LICENSE-2.0 | ||
* * | ||
* * Unless required by applicable law or agreed to in writing, software | ||
* * distributed under the License is distributed on an "AS IS" BASIS, | ||
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* * See the License for the specific language governing permissions and | ||
* * limitations under the License. | ||
* * | ||
* * For more information: http://www.orientechnologies.com | ||
* | ||
*/ | ||
package com.orientechnologies.orient.core.engine; | ||
|
||
import java.util.Map; | ||
|
||
import com.orientechnologies.orient.core.storage.OStorage; | ||
import com.orientechnologies.orient.core.storage.cache.OSnowFlakeIdGen; | ||
import com.orientechnologies.orient.core.storage.cache.OWriteCacheIdGen; | ||
|
||
public abstract class OEngineAbstract implements OEngine { | ||
private static final OWriteCacheIdGen writeCacheIdGen = new OSnowFlakeIdGen(); | ||
|
||
protected String getMode(Map<String, String> iConfiguration) { | ||
String dbMode = null; | ||
if (iConfiguration != null) | ||
dbMode = iConfiguration.get("mode"); | ||
protected int generateStorageId() { | ||
return writeCacheIdGen.nextId(); | ||
} | ||
|
||
if (dbMode == null) | ||
dbMode = "rw"; | ||
return dbMode; | ||
} | ||
protected String getMode(Map<String, String> iConfiguration) { | ||
String dbMode = null; | ||
if (iConfiguration != null) | ||
dbMode = iConfiguration.get("mode"); | ||
|
||
public void shutdown() { | ||
} | ||
if (dbMode == null) | ||
dbMode = "rw"; | ||
return dbMode; | ||
} | ||
|
||
public void removeStorage(final OStorage iStorage) { | ||
} | ||
public void shutdown() { | ||
} | ||
|
||
public void removeStorage(final OStorage iStorage) { | ||
} | ||
} |
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.