Fix for logFragment usage
This commit is contained in:
parent
68042c72d6
commit
94cd39bbb6
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<config>
|
<config>
|
||||||
<storage path="D:/temp/test" />
|
<storage path="D:/temp/test" type = "numass"/>
|
||||||
<device type="msp" name="msp">
|
<device type="msp" name="msp">
|
||||||
<connection ip="127.0.0.1" port="10014"/>
|
<connection ip="127.0.0.1" port="10014"/>
|
||||||
<peakJump>
|
<peakJump>
|
||||||
|
@ -2,6 +2,7 @@ package inr.numass.storage;
|
|||||||
|
|
||||||
import hep.dataforge.context.Context;
|
import hep.dataforge.context.Context;
|
||||||
import hep.dataforge.meta.Meta;
|
import hep.dataforge.meta.Meta;
|
||||||
|
import hep.dataforge.meta.MetaBuilder;
|
||||||
import hep.dataforge.storage.api.Storage;
|
import hep.dataforge.storage.api.Storage;
|
||||||
import hep.dataforge.storage.api.StorageType;
|
import hep.dataforge.storage.api.StorageType;
|
||||||
|
|
||||||
@ -9,74 +10,14 @@ import hep.dataforge.storage.api.StorageType;
|
|||||||
* Created by darksnake on 17-May-17.
|
* Created by darksnake on 17-May-17.
|
||||||
*/
|
*/
|
||||||
public class NumassStorageFactory implements StorageType {
|
public class NumassStorageFactory implements StorageType {
|
||||||
// /**
|
|
||||||
// * Create root numass storage
|
|
||||||
// *
|
|
||||||
// * @param dir
|
|
||||||
// * @param readOnly
|
|
||||||
// * @return
|
|
||||||
// * @throws StorageException
|
|
||||||
// */
|
|
||||||
// public static NumassStorage buildLocalNumassRoot(File dir, boolean readOnly, boolean monitor) throws StorageException {
|
|
||||||
// try {
|
|
||||||
// Meta meta = new MetaBuilder("storage")
|
|
||||||
// .setValue("type", "file.numass")
|
|
||||||
// .setValue("readOnly", readOnly)
|
|
||||||
// .setValue("monitor", monitor);
|
|
||||||
// return new NumassStorage(VFSUtils.getLocalFile(dir), meta);
|
|
||||||
// } catch (FileSystemException ex) {
|
|
||||||
// throw new RuntimeException(ex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static NumassStorage buildLocalNumassRoot(File dir, boolean readOnly) throws StorageException {
|
|
||||||
// return buildLocalNumassRoot(dir, readOnly, false);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static NumassStorage buildRemoteNumassRoot(String ip, int port, String login, String password, String path) throws StorageException {
|
|
||||||
// try {
|
|
||||||
// Meta meta = new MetaBuilder("storage")
|
|
||||||
// .setValue("type", "file.numass")
|
|
||||||
// .setValue("readOnly", true)
|
|
||||||
// .setValue("monitor", false);
|
|
||||||
// return new NumassStorage(VFSUtils.getRemoteFile(ip, port, login, password, path), meta);
|
|
||||||
// } catch (FileSystemException ex) {
|
|
||||||
// throw new RuntimeException(ex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static NumassStorage buildNumassStorage(FileStorage parent, String path, boolean readOnly, boolean monitor) throws StorageException {
|
|
||||||
// Meta meta = new MetaBuilder("storage")
|
|
||||||
// .setValue("type", "file.numass")
|
|
||||||
// .setValue("readOnly", readOnly)
|
|
||||||
// .setValue("monitor", monitor);
|
|
||||||
// return new NumassStorage(parent, path, meta);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static NumassStorage buildNumassRoot(String uri, boolean readOnly, boolean monitor) {
|
|
||||||
// try {
|
|
||||||
// Meta meta = new MetaBuilder("storage")
|
|
||||||
// .setValue("type", "file.numass")
|
|
||||||
// .setValue("readOnly", readOnly)
|
|
||||||
// .setValue("monitor", monitor);
|
|
||||||
// return new NumassStorage(VFSUtils.getFile(uri), meta);
|
|
||||||
// } catch (Exception ex) {
|
|
||||||
// throw new RuntimeException(ex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public static NumassStorage buildNumassRoot(URI uri, boolean readOnly, boolean monitor) {
|
|
||||||
// try {
|
|
||||||
// Meta meta = new MetaBuilder("storage")
|
|
||||||
// .setValue("type", "file.numass")
|
|
||||||
// .setValue("readOnly", readOnly)
|
|
||||||
// .setValue("monitor", monitor);
|
|
||||||
// return new NumassStorage(VFSUtils.getFile(uri), meta);
|
|
||||||
// } catch (Exception ex) {
|
|
||||||
// throw new RuntimeException(ex);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
public static MetaBuilder buildStorageMeta(String path, boolean readOnly, boolean monitor){
|
||||||
|
return new MetaBuilder("storage")
|
||||||
|
.setValue("path", path)
|
||||||
|
.setValue("type", "numass")
|
||||||
|
.setValue("readOnly", readOnly)
|
||||||
|
.setValue("monitor", monitor);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String type() {
|
public String type() {
|
||||||
|
Loading…
Reference in New Issue
Block a user