-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #430 from kmgowda/kmg-cqueue-1
Add concurrentQ performance benchmarking Signed-off-by: Keshava Munegowda <[email protected]>
- Loading branch information
Showing
15 changed files
with
167 additions
and
15 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
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
18 changes: 18 additions & 0 deletions
18
drivers/concurrentq/src/main/java/io/sbk/driver/ConcurrentQ/LinkedCQueue.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,18 @@ | ||
/** | ||
* Copyright (c) KMG. All Rights Reserved. | ||
* | ||
* 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 | ||
*/ | ||
|
||
package io.sbk.driver.ConcurrentQ; | ||
|
||
import io.perl.api.Queue; | ||
|
||
import java.util.concurrent.ConcurrentLinkedQueue; | ||
|
||
public class LinkedCQueue<T> extends ConcurrentLinkedQueue<T> implements Queue<T> { | ||
} |
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,12 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api project(":drivers:concurrentq") | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
drivers/conqueue/src/main/java/io/sbk/driver/Conqueue/Conqueue.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,33 @@ | ||
/** | ||
* Copyright (c) KMG. All Rights Reserved.. | ||
* | ||
* 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 | ||
*/ | ||
package io.sbk.driver.Conqueue; | ||
|
||
import io.perl.api.impl.CQueue; | ||
|
||
import io.sbk.driver.ConcurrentQ.ConcurrentQ; | ||
import io.sbk.params.ParameterOptions; | ||
import io.sbk.api.Storage; | ||
import java.io.IOException; | ||
|
||
|
||
/** | ||
* Class for Conqueue storage driver. | ||
* | ||
* Incase if your data type in other than byte[] (Byte Array) | ||
* then change the datatype and getDataType. | ||
*/ | ||
public class Conqueue extends ConcurrentQ implements Storage<byte[]> { | ||
|
||
@Override | ||
public void openStorage(final ParameterOptions params) throws IOException { | ||
this.queue = new CQueue<>(); | ||
} | ||
|
||
} |
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,9 @@ | ||
#Copyright (c) KMG. All Rights Reserved. | ||
# | ||
# 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 | ||
|
||
# Conqueue storage driver default Properties/parameters |
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,11 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api project(":drivers:concurrentq") | ||
} |
18 changes: 18 additions & 0 deletions
18
drivers/linkedbq/src/main/java/io/sbk/driver/Linkedbq/LinkedBQueue.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,18 @@ | ||
/** | ||
* Copyright (c) KMG. All Rights Reserved.. | ||
* | ||
* 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 | ||
*/ | ||
|
||
package io.sbk.driver.Linkedbq; | ||
|
||
import io.perl.api.Queue; | ||
|
||
import java.util.concurrent.LinkedBlockingDeque; | ||
|
||
public class LinkedBQueue<T> extends LinkedBlockingDeque<T> implements Queue<T> { | ||
} |
32 changes: 32 additions & 0 deletions
32
drivers/linkedbq/src/main/java/io/sbk/driver/Linkedbq/Linkedbq.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,32 @@ | ||
/** | ||
* Copyright (c) KMG. All Rights Reserved.. | ||
* | ||
* 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 | ||
*/ | ||
package io.sbk.driver.Linkedbq; | ||
|
||
|
||
import io.sbk.driver.ConcurrentQ.ConcurrentQ; | ||
import io.sbk.params.ParameterOptions; | ||
import io.sbk.api.Storage; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Class for Linkedbq storage driver. | ||
* | ||
* Incase if your data type in other than byte[] (Byte Array) | ||
* then change the datatype and getDataType. | ||
*/ | ||
public class Linkedbq extends ConcurrentQ implements Storage<byte[]> { | ||
|
||
@Override | ||
public void openStorage(final ParameterOptions params) throws IOException { | ||
this.queue = new LinkedBQueue<>(); | ||
} | ||
|
||
} |
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,9 @@ | ||
#Copyright (c) KMG. All Rights Reserved. | ||
# | ||
# 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 | ||
|
||
# Linkedbq storage driver default Properties/parameters |
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