Github user spmallette commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/570#discussion_r105952425
  
    --- Diff: 
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/CompilationOptionsCustomizer.java
 ---
    @@ -0,0 +1,39 @@
    +/*
    + * 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.tinkerpop.gremlin.groovy.jsr223;
    +
    +import org.apache.tinkerpop.gremlin.jsr223.Customizer;
    +
    +/**
    + * Provides some custom compilation options to the {@link 
GremlinGroovyScriptEngine}.
    + *
    + * @author Stephen Mallette (http://stephen.genoprime.com)
    + */
    +class CompilationOptionsCustomizer implements Customizer {
    +
    +    private final int expectedCompilationTime;
    +
    +    public CompilationOptionsCustomizer(final int expectedCompilationTime) 
{
    --- End diff --
    
    I'm converting the integers to longs just to be consistent with other times 
being in long milliseconds. The new plugin system doesn't work in the same way 
as the old so trying to push a `CompilationOptionsCustomizer` into the list of 
`compilerCustomizerProviders` won't work.  I don't really think we should 
promote the new plugin system until 3.3.0, but if you really want to give it a 
shot you'll need to look at the SNAPSHOT docs and revised config files for 
gremlin-server on the master branch that show how these new configurations go 
in place. You can get an idea of how this will work under this new model here:
    
    
https://github.com/apache/tinkerpop/blob/master/gremlin-server/conf/gremlin-server-secure.yaml#L36
    
    You would basically add a config option to that line for 
`expectedCompilationTime` and it will configure the 
`CompilationOptionsCustomizer` into the `GremlinScriptEngine`.
    
    
    When I go to merge this to master, I'll need to update docs to reflect how 
this configuration setting works. I will comment back here as soon as I've 
pushed the latest changed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to