<commit_before>/*
 * Copyright 2006-2007 the original author or authors.
 *
 * 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.
 */

package org.openspaces.jee.sessions.jetty;

import com.j_spaces.core.IJSpace;
import com.j_spaces.core.client.SQLQuery;
import edu.emory.mathcs.backport.java.util.concurrent.Executors;
import edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.ScheduledFuture;
import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit;
import net.jini.core.lease.Lease;
import org.mortbay.log.Log;
import org.mortbay.util.LazyList;
import org.openspaces.core.GigaSpace;
import org.openspaces.core.space.UrlSpaceConfigurer;
import org.openspaces.pu.container.jee.jetty.JettyJeeProcessingUnitContainerProvider;
import org.springframework.context.ApplicationContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


/**
 * GigaspacesSessionManager
 *
 * A Jetty SessionManager where the session data is stored in a
 * data grid "cloud".
 *
 * On each request, the session data is looked up in the "cloud"
 * and brought into the local space cache if doesn't already exist,
 * and an entry put into the managers map of sessions. When the request
 * exists, any changes, including changes to the access time of the session
 * are written back out to the grid.
 */
public class GigaSessionManager extends org.mortbay.jetty.servlet.AbstractSessionManager {

    private IJSpace space;

    private UrlSpaceConfigurer urlSpaceConfigurer;

    private String spaceUrl;
<commit_msg>fixed wrong usage of executors (used backport by mistake)<commit_after>/*
 * Copyright 2006-2007 the original author or authors.
 *
 * 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.
 */

package org.openspaces.jee.sessions.jetty;

import com.j_spaces.core.IJSpace;
import com.j_spaces.core.client.SQLQuery;
import net.jini.core.lease.Lease;
import org.mortbay.log.Log;
import org.mortbay.util.LazyList;
import org.openspaces.core.GigaSpace;
import org.openspaces.core.space.UrlSpaceConfigurer;
import org.openspaces.pu.container.jee.jetty.JettyJeeProcessingUnitContainerProvider;
import org.springframework.context.ApplicationContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;


/**
 * GigaspacesSessionManager
 *
 * A Jetty SessionManager where the session data is stored in a
 * data grid "cloud".
 *
 * On each request, the session data is looked up in the "cloud"
 * and brought into the local space cache if doesn't already exist,
 * and an entry put into the managers map of sessions. When the request
 * exists, any changes, including changes to the access time of the session
 * are written back out to the grid.
 */
public class GigaSessionManager extends org.mortbay.jetty.servlet.AbstractSessionManager {

    private IJSpace space;

    private UrlSpaceConfigurer urlSpaceConfigurer;

    private String spaceUrl;

{'fraction_non_alphanumeric': 0.07851054284432481, 'fraction_numerical': 0.005383580080753701, 'mean_word_length': 4.72400513478819, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6441341', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1219, 'n_words': 428}