Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# IGNITE-692 Implemented support for GG and Ignite.
- Loading branch information
1 parent
aa8f668
commit 97a83a0
Showing
15 changed files
with
393 additions
and
294 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
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
69 changes: 69 additions & 0 deletions
69
modules/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryArg.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,69 @@ | ||
/* | ||
* 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.ignite.internal.visor.query; | ||
|
||
import java.io.*; | ||
|
||
/** | ||
* Arguments for {@link VisorQueryTask}. | ||
*/ | ||
public class VisorQueryArg implements Serializable { | ||
/** */ | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** Cache name for query. */ | ||
private final String cacheName; | ||
|
||
/** Query text. */ | ||
private final String qryTxt; | ||
|
||
/** Result batch size. */ | ||
private final Integer pageSize; | ||
|
||
/** | ||
* @param cacheName Cache name for query. | ||
* @param qryTxt Query text. | ||
* @param pageSize Result batch size. | ||
*/ | ||
public VisorQueryArg(String cacheName, String qryTxt, Integer pageSize) { | ||
this.cacheName = cacheName; | ||
this.qryTxt = qryTxt; | ||
this.pageSize = pageSize; | ||
} | ||
|
||
/** | ||
* @return Cache name. | ||
*/ | ||
public String cacheName() { | ||
return cacheName; | ||
} | ||
|
||
/** | ||
* @return Query txt. | ||
*/ | ||
public String queryTxt() { | ||
return qryTxt; | ||
} | ||
|
||
/** | ||
* @return Page size. | ||
*/ | ||
public Integer pageSize() { | ||
return pageSize; | ||
} | ||
} |
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
64 changes: 64 additions & 0 deletions
64
...les/core/src/main/java/org/apache/ignite/internal/visor/query/VisorQueryCursorHolder.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,64 @@ | ||
/* | ||
* 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.ignite.internal.visor.query; | ||
|
||
import java.io.*; | ||
|
||
/** | ||
* ResultSet future holder. | ||
*/ | ||
public class VisorQueryCursorHolder<T> implements Serializable { | ||
/** */ | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** Query cursor. */ | ||
private final VisorQueryCursor<T> cur; | ||
|
||
/** Flag indicating that this future was read from last check. */ | ||
private volatile boolean accessed; | ||
|
||
/** | ||
* @param cur Future. | ||
* @param accessed {@code true} if query was accessed before remove timeout expired. | ||
*/ | ||
public VisorQueryCursorHolder(VisorQueryCursor<T> cur, boolean accessed) { | ||
this.cur = cur; | ||
this.accessed = accessed; | ||
} | ||
|
||
/** | ||
* @return Query cursor. | ||
*/ | ||
public VisorQueryCursor<T> cursor() { | ||
return cur; | ||
} | ||
|
||
/** | ||
* @return Flag indicating that this future was read from last check.. | ||
*/ | ||
public boolean accessed() { | ||
return accessed; | ||
} | ||
|
||
/** | ||
* @param accessed New accessed. | ||
*/ | ||
public void accessed(boolean accessed) { | ||
this.accessed = accessed; | ||
} | ||
} |
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.