-
Notifications
You must be signed in to change notification settings - Fork 3
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
4e22844
commit d4531b1
Showing
17 changed files
with
72 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.class | ||
target/ | ||
*.kryo |
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
File renamed without changes.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,16 @@ | ||
plugins { | ||
java | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.apache.tinkerpop:tinkergraph-gremlin:3.6.2") | ||
} | ||
|
||
tasks.jar { | ||
archiveFileName.set("${rootProject.name}.jar") | ||
destinationDirectory.set(rootDir) | ||
} |
File renamed without changes.
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,16 @@ | ||
plugins { | ||
java | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("org.apache.tinkerpop:tinkergraph-gremlin:3.7.2") | ||
} | ||
|
||
tasks.jar { | ||
archiveFileName.set("${rootProject.name}-37.jar") | ||
destinationDirectory.set(rootDir) | ||
} |
29 changes: 29 additions & 0 deletions
29
tinkerpop-id-manager/3.7/src/main/java/cloud/localstack/UUIDAnyIdManager.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,29 @@ | ||
package cloud.localstack; | ||
|
||
|
||
import org.apache.tinkerpop.gremlin.tinkergraph.structure.AbstractTinkerGraph; | ||
|
||
import java.util.UUID; | ||
|
||
public class UUIDAnyIdManager implements AbstractTinkerGraph.IdManager<String> { | ||
@Override | ||
public String getNextId(final AbstractTinkerGraph graph) { | ||
return UUID.randomUUID().toString(); | ||
} | ||
|
||
@Override | ||
public String convert(final Object id) { | ||
if (null == id) { | ||
return null; | ||
} | ||
if (!(id instanceof String)) { | ||
throw new IllegalArgumentException(String.format("Expected an id that is String but received %s - [%s]", id.getClass(), id)); | ||
} | ||
return (String) id; | ||
} | ||
|
||
@Override | ||
public boolean allow(final Object id) { | ||
return id instanceof String; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -8,3 +8,5 @@ | |
*/ | ||
|
||
rootProject.name = "tinkerpop-id-manager" | ||
|
||
include("3.6", "3.7") |
Binary file not shown.
Binary file not shown.