-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23fc1f1
commit a2f8b7e
Showing
33 changed files
with
206 additions
and
67 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
File renamed without changes.
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
File renamed without changes.
53 changes: 53 additions & 0 deletions
53
...ore-common/src/main/java/org/irods/jargon2/common/confg/props/CachedJargonProperties.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,53 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.common.confg.props; | ||
|
||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
/** | ||
* Defines global tuning and behavior properties. Properties are internally | ||
* stored as a concurrent hashmap, allowing sharing of this properties class | ||
* among services. | ||
* | ||
* @author mconway | ||
* | ||
*/ | ||
public class CachedJargonProperties implements JargonProperties { | ||
|
||
public static final String CONNECTION_TIMEOUT_IN_SECONDS = "connection.timeout"; | ||
|
||
private ConcurrentHashMap<String, String> propertiesCache = new ConcurrentHashMap<>(); | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see org.irods.jargon2.utils.confg.props.JargonPropertiesIf# | ||
* getConnectionTimeoutInSeconds() | ||
*/ | ||
@Override | ||
public int getConnectionTimeoutInSeconds() { | ||
return valAsIntOrZero(CONNECTION_TIMEOUT_IN_SECONDS); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see org.irods.jargon2.utils.confg.props.JargonPropertiesIf# | ||
* setConnectionTimeoutInSeconds(int) | ||
*/ | ||
@Override | ||
public void setConnectionTimeoutInSeconds(int timeout) { | ||
propertiesCache.put(CONNECTION_TIMEOUT_IN_SECONDS, String.valueOf(timeout)); | ||
} | ||
|
||
private int valAsIntOrZero(final String key) { | ||
String stringVal = propertiesCache.get(key); | ||
if (stringVal == null) { | ||
return 0; | ||
} else { | ||
return Integer.parseInt(stringVal); | ||
} | ||
} | ||
|
||
} |
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
4 changes: 2 additions & 2 deletions
4
...ls/confg/props/JargonPropertiesMBean.java → .../common/confg/props/JargonProperties.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
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
* @author mconway | ||
* | ||
*/ | ||
package org.irods.jargon2.utils.confg.props; | ||
package org.irods.jargon2.common.confg.props; |
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions
60
jargon2-core-common/src/main/java/org/irods/jargon2/exception/io/JargonIOException.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,60 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.exception.io; | ||
|
||
import org.irods.jargon2.exception.JargonException; | ||
|
||
/** | ||
* General IO Exception | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
public class JargonIOException extends JargonException { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 5668474226177204223L; | ||
|
||
/** | ||
* | ||
*/ | ||
public JargonIOException() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @param arg0 | ||
* @param arg1 | ||
* @param arg2 | ||
* @param arg3 | ||
*/ | ||
public JargonIOException(String arg0, Throwable arg1, boolean arg2, boolean arg3) { | ||
super(arg0, arg1, arg2, arg3); | ||
} | ||
|
||
/** | ||
* @param arg0 | ||
* @param arg1 | ||
*/ | ||
public JargonIOException(String arg0, Throwable arg1) { | ||
super(arg0, arg1); | ||
} | ||
|
||
/** | ||
* @param arg0 | ||
*/ | ||
public JargonIOException(String arg0) { | ||
super(arg0); | ||
} | ||
|
||
/** | ||
* @param arg0 | ||
*/ | ||
public JargonIOException(Throwable arg0) { | ||
super(arg0); | ||
} | ||
|
||
} |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
jargon2-core-if/src/main/java/org/irods/jargon2/core/context/IOContext.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,27 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.core.context; | ||
|
||
import org.irods.jargon2.common.confg.props.JargonProperties; | ||
import org.irods.jargon2.core.context.monitor.InstrumentationSink; | ||
|
||
/** | ||
* Represents a shared, thread safe object between IO operations and the process | ||
* calling those operations. This allows cancellation, pause, and other types of | ||
* information to be passed to the i/o process. | ||
* | ||
* @author mconway | ||
* | ||
*/ | ||
public class IOContext { | ||
|
||
private JargonProperties jargonProperties; | ||
|
||
/** | ||
* {@link InstrumentationSink} that can receive reports of performance | ||
* characteristics, timing, etc, per the message hierarcy | ||
*/ | ||
private InstrumentationSink instrumentationSink; | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...rods/jargon2/core/ioplugin/IOMonitor.java → ...rgon2/core/context/monitor/IOMonitor.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
2 changes: 1 addition & 1 deletion
2
.../core/ioplugin/IOMonitorStatusReport.java → ...ontext/monitor/IOMonitorStatusReport.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
16 changes: 16 additions & 0 deletions
16
...on2-core-if/src/main/java/org/irods/jargon2/core/context/monitor/InstrumentationSink.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,16 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.core.context.monitor; | ||
|
||
/** | ||
* Receiver of instrumentation, these are messages that indicate the performance | ||
* of various operations. How reports are handled and analyzed is implementation | ||
* dependent, but each implementation should minimize latency and overhead. | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
public interface InstrumentationSink { | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
jargon2-core-if/src/main/java/org/irods/jargon2/core/context/monitor/package-info.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,8 @@ | ||
|
||
/** | ||
* Support for callacks and monitoring/instrumentation | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
package org.irods.jargon2.core.context.monitor; |
9 changes: 9 additions & 0 deletions
9
jargon2-core-if/src/main/java/org/irods/jargon2/core/context/package-info.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,9 @@ | ||
|
||
/** | ||
* Main interfaces providing context, property management, and shared references | ||
* between parts of the API | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
package org.irods.jargon2.core.context; |
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
16 changes: 0 additions & 16 deletions
16
jargon2-core-if/src/main/java/org/irods/jargon2/core/ioplugin/IOContext.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
jargon2-core-util/src/main/java/org/irods/jargon2/utils/confg/props/JargonProperties.java
This file was deleted.
Oops, something went wrong.
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