Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1095

Create a custom ScriptContext

VotersStop watchingWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 3.1.0-incubating
    • 3.2.5
    • groovy
    • None

    Description

      The current ScriptContext in use with the ScriptEngine is the SimpleScriptContext. It doesnt' allow for additional scopes which might be useful when dealing with the ScriptEnginePluginAcceptor which allows plugins to inject "global" bindings into the a ScriptEngine instance (e.g. the "hdfs" object with the hadoop plugin).

      We currently inject this into the GLOBAL_SCOPE of the ScriptEngine which at the moment doesn't seem to conflict with anything, but I wonder if more separation is required.

      Another alternative would be to manage these types of "globals" with new methods on the DependencyManager interface.

      Attachments

        1. allocations-after.png
          224 kB
          Stephen Mallette
        2. allocations-before.png
          213 kB
          Stephen Mallette
        3. gc-after.png
          128 kB
          Stephen Mallette
        4. gc-before.png
          159 kB
          Stephen Mallette

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            2 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment