本文整理汇总了Java中org.fosstrak.ale.exception.ReaderLoopException类的典型用法代码示例。如果您正苦于以下问题:Java ReaderLoopException类的具体用法?Java ReaderLoopException怎么用?Java ReaderLoopException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReaderLoopException类属于org.fosstrak.ale.exception包,在下文中一共展示了ReaderLoopException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setProperties
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void setProperties(String name, List<LRProperty> properties) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, SecurityException, ImplementationException {
throwValidationExceptionOnNullInput(properties);
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
LRSpec spec = logRd.getLRSpec();
if (spec.getProperties() == null) {
spec.setProperties(new LRSpec.Properties());
}
// we need to replace the properties, not just add to the old ones.
spec.getProperties().getProperty().clear();
spec.getProperties().getProperty().addAll(properties);
LOG.debug("set the properties");
try {
update(name, spec);
} catch (ReaderLoopException e) {
String errMsg = "ReaderLoopException during update.";
LOG.debug(errMsg, e);
throw new ImplementationException(errMsg, e);
}
}
示例2: addReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void addReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException, NonCompositeReaderException {
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
throwNonCompositeReaderExceptionIfReaderNotComposite(logRd, name);
throwValidationExceptionIfNotAllReadersAvailable(readers);
LRSpec spec = logRd.getLRSpec();
if (spec.getReaders() == null) {
spec.setReaders(new LRSpec.Readers());
}
for (String reader : readers) {
if (!spec.getReaders().getReader().contains(reader)) {
spec.getReaders().getReader().add(reader);
}
}
update(name, spec);
}
示例3: setReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void setReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, NonCompositeReaderException, ReaderLoopException, SecurityException, ImplementationException {
aleac.checkAccess(authScope, Thread.currentThread().getStackTrace()[1].getMethodName());
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
throwNonCompositeReaderExceptionIfReaderNotComposite(logRd, name);
throwValidationExceptionIfNotAllReadersAvailable(readers);
LRSpec spec = logRd.getLRSpec();
spec.setReaders(new LRSpec.Readers());
spec.getReaders().getReader().addAll(readers);
update(name, spec);
}
示例4: addReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void addReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException, NonCompositeReaderException {
aleac.checkAccess(authScope, Thread.currentThread().getStackTrace()[1].getMethodName());
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
throwNonCompositeReaderExceptionIfReaderNotComposite(logRd, name);
throwValidationExceptionIfNotAllReadersAvailable(readers);
LRSpec spec = logRd.getLRSpec();
if (spec.getReaders() == null) {
spec.setReaders(new LRSpec.Readers());
}
for (String reader : readers) {
if (!spec.getReaders().getReader().contains(reader)) {
spec.getReaders().getReader().add(reader);
}
}
update(name, spec);
}
示例5: setReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void setReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, NonCompositeReaderException, ReaderLoopException, SecurityException, ImplementationException {
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
throwNonCompositeReaderExceptionIfReaderNotComposite(logRd, name);
throwValidationExceptionIfNotAllReadersAvailable(readers);
LRSpec spec = logRd.getLRSpec();
spec.setReaders(new LRSpec.Readers());
spec.getReaders().getReader().addAll(readers);
update(name, spec);
}
示例6: update
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void update(String name, LRSpec spec) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException {
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
logRd.update(spec);
persistenceRemoveAPI.removeLRSpec(name);
persistenceWriteAPI.writeLRSpec(name, spec);
}
示例7: update
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
@Override
public void update(String name, LRSpec spec) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException {
aleac.checkAccess(authScope, Thread.currentThread().getStackTrace()[1].getMethodName());
LogicalReader logRd = logicalReaders.get(name);
throwNoSuchNameExceptionIfReaderNull(logRd, name);
// check if each reader in a list of spec exists or not
if(spec.getReaders() != null) {
for(String readerName : spec.getReaders().getReader()) {
if(!logicalReaders.containsKey(readerName)) {
throw new ValidationException("no such reader");
}
if(readerName.equals(name)) {
throw new ReaderLoopException("reader loop detected");
}
}
}
int numObservers = logRd.countObservers();
if(numObservers > 0) {
throw new InUseException("logical reader is in use");
}
logRd.update(spec);
persistenceRemoveAPI.removeLRSpec(name);
persistenceWriteAPI.writeLRSpec(name, spec);
}
示例8: setReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
/**
* changes the list of readers in a composite reader (see 10.3 API).
* @param name name of the composite reader
* @param readers list of readers to be changed
* @throws NoSuchNameException whenever the specified name is not defined in the logicalReader API
* @throws ValidationException the provided LRSpec is invalid
* @throws InUseException Is thrown when you try to undefine a Reader that is still referenced by EC or CC
* @throws ImmutableReaderException whenever you want to change a immutable reader
* @throws ReaderLoopException the reader would include itself which would result in a loop
* @throws SecurityException the operation was not permitted due to access restrictions
* @throws ImplementationException whenever something goes wrong inside the implementation
* @throws NonCompositeReaderException addReader or setReader was called on a non compositeReader
*/
void setReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, NonCompositeReaderException, ReaderLoopException, SecurityException, ImplementationException;
示例9: addReaders
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
/**
* adds the specified logical readers to a composite reader (see 10.3 API).
* @param name name of the composite reader
* @param readers list of readers to be added to the composite reader
* @throws NoSuchNameException whenever the specified name is not defined in the logicalReader API
* @throws ValidationException the provided LRSpec is invalid
* @throws InUseException Is thrown when you try to undefine a Reader that is still referenced by EC or CC
* @throws ImmutableReaderException whenever you want to change a immutable reader
* @throws ReaderLoopException the reader would include itself which would result in a loop
* @throws SecurityException the operation was not permitted due to access restrictions
* @throws ImplementationException whenever something goes wrong inside the implementation
* @throws NonCompositeReaderException the reader is not composite.
*/
void addReaders(String name, java.util.List<String> readers) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException, NonCompositeReaderException;
示例10: update
import org.fosstrak.ale.exception.ReaderLoopException; //导入依赖的package包/类
/**
* Changes the definition of the logical reader named name to
* match the specification in the spec parameter. This is
* different than calling undefine followed by define, because
* update may be called even if there are defined ECSpecs,
* CCSpecs, or other logical readers that refer to this
* logical reader.
* @param name a valid name for the reader to be changed.
* @param spec an LRSpec describing the changes to the reader
* @throws ImmutableReaderException whenever you want to change a immutable reader
* @throws ValidationException the provided LRSpec is invalid
* @throws InUseException Is thrown when you try to undefine a Reader that is still referenced by EC or CC
* @throws ReaderLoopException the reader would include itself which would result in a loop
* @throws SecurityException the operation was not permitted due to access restrictions
* @throws ImplementationException whenever something goes wrong inside the implementation
* @throws NoSuchNameException whenever the specified name is not defined in the logicalReader API
*/
void update(String name, LRSpec spec) throws NoSuchNameException, ValidationException, InUseException, ImmutableReaderException, ReaderLoopException, SecurityException, ImplementationException;