本文整理匯總了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;