@Override final protected JsonValue execGetItem(HttpAction action) { throw new InternalErrorException("GET for AsyncTask -- Should not be here!") ; }
public void removeMonitor(DatasetChanges changes) { if ( monitor != changes ) throw new InternalErrorException() ; monitor = null ; }
public void removeTransactionalMonitor(TransactionalMonitor changes) { if ( txnMonitor != changes ) throw new InternalErrorException() ; txnMonitor = null ; }
@Override final protected JsonValue execGetItem(HttpAction action) { throw new InternalErrorException("GET for AsyncTask -- Should not be here!") ; }
public static int strCompare(String s1, String s2) { // Value is the difference of the first differing chars int x = s1.compareTo(s2) ; if ( x < 0 ) return CMP_LESS ; if ( x > 0 ) return CMP_GREATER ; if ( x == 0 ) return CMP_EQUAL ; throw new InternalErrorException("String comparison failure") ; }
public static int strCompareIgnoreCase(String s1, String s2) { // x is the difference of the first differing chars int x = s1.compareToIgnoreCase(s2) ; if ( x < 0 ) return CMP_LESS ; if ( x > 0 ) return CMP_GREATER ; if ( x == 0 ) return CMP_EQUAL ; throw new InternalErrorException("String comparison failure") ; }
public static int strCompare(String s1, String s2) { // Value is the difference of the first differing chars int x = s1.compareTo(s2) ; if ( x < 0 ) return CMP_LESS ; if ( x > 0 ) return CMP_GREATER ; if ( x == 0 ) return CMP_EQUAL ; throw new InternalErrorException("String comparison failure") ; }
@Override public Record next() { if ( ! hasNext() ) throw new NoSuchElementException() ; Record r = slot ; if ( r == null ) throw new InternalErrorException("Null slot after hasNext is true") ; slot = null ; return r ; } }
public void reset(BPTreeNode node, int idx, BPTreePage page) { AccessStep s = traversed.remove(traversed.size()-1) ; AccessStep s2 = new AccessStep(node, idx, page) ; if ( s.node != s2.node ) throw new InternalErrorException("Bad attempt to reset: "+this+" with "+s2) ; traversed.add(new AccessStep(node, idx, page)) ; }
public BlankNodeAllocatorHash() { reset(); try { mDigest = MessageDigest.getInstance(DigestAlgorithm); } catch (NoSuchAlgorithmException e) { throw new InternalErrorException("failed to create message digest", e); } cache = CacheFactory.createCache(CacheSize); }
private void start() { if ( startPoint != null ) { String msg = format("[Task %s] Async task has already been started", taskId) ; Log.warn(Fuseki.serverLog, msg) ; throw new InternalErrorException("Finish has already been called ["+getTaskId()+"]") ; } Fuseki.serverLog.info(format("[Task %s] starts : %s",taskId, displayName)) ; startPoint = DateTimeUtils.nowAsXSDDateTimeString() ; }
/** Create digest auth {@link DigestScheme} */ private static RFC2617Scheme authScheme(String realm) { switch (authMode) { case BASIC: return authBasicScheme(realm); case DIGEST : return authDigestScheme(realm); default: throw new InternalErrorException("RFC2617 auth scheme not reocgnized: "+authMode); } }
@Override public void finishPair(long currLine, long currCol) { if ( value == null ) throw new InternalErrorException("null for 'value' (bad finishPair() allignment)") ; String k = keys.pop(); JsonObject obj = objects.peek() ; if ( obj.hasKey(k) ) Log.warn("JSON", "Duplicate key '"+k+"' for object ["+currLine+","+currCol+"]") ; obj.put(k, value) ; value = null ; }
public Endpoint(Operation operation, String endpointName, AuthPolicy requestAuth) { this.operation = Objects.requireNonNull(operation, "operation"); if ( operation == null ) throw new InternalErrorException("operation is null"); this.endpointName = Objects.requireNonNull(endpointName, "endpointName"); this.authPolicy = requestAuth; // Standard counters - there may be others counters.add(CounterName.Requests); counters.add(CounterName.RequestsGood); counters.add(CounterName.RequestsBad); }
/** Create digest auth {@link DigestScheme} */ private static RFC2617Scheme authScheme(String realm) { switch (authMode) { case BASIC: return authBasicScheme(realm); case DIGEST : return authDigestScheme(realm); default: throw new InternalErrorException("RFC2617 auth scheme not reocgnized: "+authMode); } }
public static Var applyVar(Var v, ExprTransform exprTransform) { if ( exprTransform == null ) return v ; ExprVar expr = new ExprVar(v) ; Expr e = exprTransform.transform(expr) ; if ( e instanceof ExprVar ) return ((ExprVar)e).asVar() ; throw new InternalErrorException("Managed to turn a variable " + v + " into " + e) ; }
/** Promote a B+Tree root */ static boolean promoteRoot(BPTreeNode root) { if ( ! root.isRoot() ) throw new InternalErrorException("Not a root") ; boolean changed = root.promote() ; root.bpTree.newRoot(root) ; return changed ; }
private void updateExec(UpdateRequest update, String updateString ) { checkUpdate(); if ( update == null && updateString == null ) throw new InternalErrorException("Both update request and update string are null"); if ( update == null ) { if ( parseCheckUpdates ) UpdateFactory.create(updateString); } // Use the update string as provided if possible, otherwise serialize the update. String updateStringToSend = ( updateString != null ) ? updateString : update.toString(); exec(()->HttpOp.execHttpPost(svcUpdate, WebContent.contentTypeSPARQLUpdate, updateStringToSend, this.httpClient, this.httpContext)); }
/** Transform node then create a {@link ExprVar} or {@link NodeValue}. */ private Expr transform(Node input) { Node n = transform.apply(input); if ( n == null ) throw new InternalErrorException("NodeTransform creates a null"); if ( ! Var.isVar(n) ) return NodeValue.makeNode(n); String name = Var.alloc(n).getVarName(); return new ExprVar(n.getName()); } }
@Override public final String alloc(Node scope, Node node) { if ( node.isURI() ) return labelForURI(node) ; if ( node.isLiteral() ) return labelForLiteral(node) ; if ( node.isBlank() ) return labelForBlank(node) ; if ( node.isVariable() ) return labelForVar(node) ; throw new InternalErrorException("Node type not supported: "+node) ; }