repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecification.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
import com.github.jankroken.commandline.domain.InternalErrorException; import com.github.jankroken.commandline.domain.InvalidCommandLineException; import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; impo...
private void handleArguments(Object args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (occurrences == Occurrences.SINGLE) { method.invoke(spec, args); } else { argumentBuffer.add(args); } } public void...
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
return new InternalErrorException(getOptionId() + ' ' + description);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/happy/BasicParserTest.java
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.SIMPLE; import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.happy; public class BasicParserTest { @Test public void testSimpleConfiguration() throws Exception { final var args = new String[]{"-f", "hello.txt", "-v"};
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
final var config = parse(SimpleConfiguration.class, args, SIMPLE);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/util/ArrayIteratorTest.java
// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java // public static final String[] EMPTY_STRING_ARRAY = new String[]{};
import org.junit.jupiter.api.Test; import java.util.NoSuchElementException; import static com.github.jankroken.commandline.util.Constants.EMPTY_STRING_ARRAY; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.*;
package com.github.jankroken.commandline.util; public class ArrayIteratorTest { @Test public void testEmpty() {
// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java // public static final String[] EMPTY_STRING_ARRAY = new String[]{}; // Path: src/test/java/com/github/jankroken/commandline/util/ArrayIteratorTest.java import org.junit.jupiter.api.Test; import java.util.NoSuchElementException; import static...
var ai = new ArrayIterator<>(EMPTY_STRING_ARRAY);
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecificationFactory.java
// Path: src/main/java/com/github/jankroken/commandline/util/Methods.java // public class Methods { // // private final Class<?> annotatedClass; // // public Methods(Class<?> annotatedClass) { // this.annotatedClass = annotatedClass; // } // // public List<Method> byAnnotation(Class<? extends Annotati...
import com.github.jankroken.commandline.annotations.*; import com.github.jankroken.commandline.util.Methods; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List;
} else if (annotation instanceof LongSwitch) { builder.addLongSwitch(((LongSwitch) annotation).value()); } else if (annotation instanceof ShortSwitch) { builder.addShortSwitch(((ShortSwitch) annotation).value()); } else if (annotation instanceof Toggle...
// Path: src/main/java/com/github/jankroken/commandline/util/Methods.java // public class Methods { // // private final Class<?> annotatedClass; // // public Methods(Class<?> annotatedClass) { // this.annotatedClass = annotatedClass; // } // // public List<Method> byAnnotation(Class<? extends Annotati...
var methods = new Methods(optionClass).byAnnotation(Option.class);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/happy/SimpleParserTest.java
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.SIMPLE; import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.happy; public class SimpleParserTest { @Test public void testSimpleConfiguration() throws Exception { final var args = new String[]{"-f", "hello.txt", "-v"};
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
final var config = parse(SimpleConfiguration.class, args, SIMPLE);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/domain/LongOrCompactTokenizerTest.java
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java // public class LongOrCompactTokenizer implements Tokenizer { // // private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); // private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compi...
import com.github.jankroken.commandline.domain.internal.LongOrCompactTokenizer; import com.github.jankroken.commandline.util.ArrayIterator; import com.github.jankroken.commandline.util.PeekIterator; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.domain; public class LongOrCompactTokenizerTest { @Test public void simpleArgumentSplit() { final var args = new String[]{"-abcf", "hello.txt"};
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java // public class LongOrCompactTokenizer implements Tokenizer { // // private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); // private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compi...
final var peekIterator = new PeekIterator<>(new ArrayIterator<>(args));
jankroken/commandline
src/test/java/com/github/jankroken/commandline/domain/LongOrCompactTokenizerTest.java
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java // public class LongOrCompactTokenizer implements Tokenizer { // // private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); // private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compi...
import com.github.jankroken.commandline.domain.internal.LongOrCompactTokenizer; import com.github.jankroken.commandline.util.ArrayIterator; import com.github.jankroken.commandline.util.PeekIterator; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.domain; public class LongOrCompactTokenizerTest { @Test public void simpleArgumentSplit() { final var args = new String[]{"-abcf", "hello.txt"};
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java // public class LongOrCompactTokenizer implements Tokenizer { // // private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); // private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compi...
final var peekIterator = new PeekIterator<>(new ArrayIterator<>(args));
jankroken/commandline
src/test/java/com/github/jankroken/commandline/happy/LongOrCompactParserTest.java
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.LONG_OR_COMPACT; import static org.assertj.core.api.Assertions.assertThat;
package com.github.jankroken.commandline.happy; public class LongOrCompactParserTest { @Test public void testSimpleConfiguration() throws Exception { final var args = new String[]{"-vf", "hello.txt"};
// Path: src/main/java/com/github/jankroken/commandline/CommandLineParser.java // public static <T> T parse(Class<T> optionClass, String[] args, OptionStyle style) // throws IllegalAccessException, InstantiationException, InvocationTargetException { // T spec; // try { // spec = optionClass.getC...
final var config = parse(SimpleConfiguration.class, args, LONG_OR_COMPACT);
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/OptionSet.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java // public class InvalidCommandLineException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidCommandLineException(String message) { // super(message); //...
import com.github.jankroken.commandline.domain.InvalidCommandLineException; import com.github.jankroken.commandline.domain.UnrecognizedSwitchException; import java.lang.reflect.InvocationTargetException; import java.util.List;
this.optionSetLevel = optionSetLevel; this.spec = spec; } public OptionSpecification getOptionSpecification(SwitchToken _switch) { for (final var optionSpecification : options) { if (optionSpecification.getSwitch().matches(_switch.getValue())) { return option...
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java // public class InvalidCommandLineException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidCommandLineException(String message) { // super(message); //...
throw new UnrecognizedSwitchException(spec.getClass(), args.peek().getValue());
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/OptionSet.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java // public class InvalidCommandLineException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidCommandLineException(String message) { // super(message); //...
import com.github.jankroken.commandline.domain.InvalidCommandLineException; import com.github.jankroken.commandline.domain.UnrecognizedSwitchException; import java.lang.reflect.InvocationTargetException; import java.util.List;
return optionSpecification; } } return null; } public void consumeOptions(Tokenizer args) throws IllegalAccessException, InvocationTargetException, InstantiationException { while (args.hasNext()) { if (args.peek() instanceof SwitchToke...
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java // public class InvalidCommandLineException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidCommandLineException(String message) { // super(message); //...
throw new InvalidCommandLineException("Invalid argument: " + args.peek());
jankroken/commandline
src/test/java/com/github/jankroken/commandline/domain/OptionSpecificationFactoryTest.java
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecificationFactory.java // public class OptionSpecificationFactory { // // // public static OptionSpecification getOptionSpecification(Object spec, Method method) { // var builder = new OptionSpecificationBuilder(); // ...
import com.github.jankroken.commandline.domain.internal.OptionSpecificationFactory; import com.github.jankroken.commandline.happy.SimpleConfiguration; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals;
package com.github.jankroken.commandline.domain; public class OptionSpecificationFactoryTest { @Test public void testOptionSpecificationFactory() { var conf = new SimpleConfiguration();
// Path: src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecificationFactory.java // public class OptionSpecificationFactory { // // // public static OptionSpecification getOptionSpecification(Object spec, Method method) { // var builder = new OptionSpecificationBuilder(); // ...
var specifications = OptionSpecificationFactory.getOptionSpecifications(conf, conf.getClass());
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
import com.github.jankroken.commandline.domain.ArgumentToken; import com.github.jankroken.commandline.util.PeekIterator; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.regex.Pattern;
package com.github.jankroken.commandline.domain.internal; public class LongOrCompactTokenizer implements Tokenizer { private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compile("--..*"); private static final Pattern SHORT...
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
private final PeekIterator<String> stringIterator;
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/LongOrCompactTokenizer.java
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
import com.github.jankroken.commandline.domain.ArgumentToken; import com.github.jankroken.commandline.util.PeekIterator; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.regex.Pattern;
package com.github.jankroken.commandline.domain.internal; public class LongOrCompactTokenizer implements Tokenizer { private static final Pattern SWITCH_PATTERN = Pattern.compile("-.*"); private static final Pattern LONG_STYLE_SWITCH_PATTERN = Pattern.compile("--..*"); private static final Pattern SHORT...
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
return new ArgumentToken(value);
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/ArgumentConsumptionBuilder.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
import com.github.jankroken.commandline.domain.InternalErrorException; import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import static com.github.jankroken.commandline.domain.internal.ArgumentConsumptionType.*;
single_argument = true; } public void addUntilDelimiter(String delimiter) { until_delimiter = true; this.delimiter = delimiter; } public void addAllAvailable() { all_available = true; } public void addLooseArgs() { loose_args = true; } public v...
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
throw new InvalidOptionConfigurationException("No argument consumption type specified");
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/ArgumentConsumptionBuilder.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
import com.github.jankroken.commandline.domain.InternalErrorException; import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import static com.github.jankroken.commandline.domain.internal.ArgumentConsumptionType.*;
if (single_argument) argumentConsumptionTypeCounter++; if (until_delimiter) argumentConsumptionTypeCounter++; if (all_available) argumentConsumptionTypeCounter++; if (sub_set) argumentConsumptionTypeCounter++; if (loose_args) argumentConsumptionTypeCounter++; if (argument...
// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java // public class InternalErrorException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InternalErrorException(String message) { // super(message); // } // } // ...
throw new InternalErrorException("Internal error: no matching argument consumption types");
jankroken/commandline
src/main/java/com/github/jankroken/commandline/domain/internal/SimpleTokenizer.java
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
import com.github.jankroken.commandline.domain.ArgumentToken; import com.github.jankroken.commandline.util.PeekIterator; import java.util.Objects;
package com.github.jankroken.commandline.domain.internal; public class SimpleTokenizer implements Tokenizer { private final PeekIterator<String> stringIterator; private boolean argumentEscapeEncountered; private String argumentTerminator; public SimpleTokenizer(PeekIterator<String> stringIterator) ...
// Path: src/main/java/com/github/jankroken/commandline/domain/ArgumentToken.java // public class ArgumentToken implements Token { // private final String value; // // public ArgumentToken(String value) { // this.value = value; // } // // public String getValue() { // return value; // ...
return new ArgumentToken(value);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/util/PeekIteratorTest.java
// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java // public static final String[] EMPTY_STRING_ARRAY = new String[]{};
import org.junit.jupiter.api.Test; import java.util.NoSuchElementException; import static com.github.jankroken.commandline.util.Constants.EMPTY_STRING_ARRAY; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.*;
package com.github.jankroken.commandline.util; public class PeekIteratorTest { private static PeekIterator<String> createIterator(String[] args) { var ai = new ArrayIterator<>(args); return new PeekIterator<>(ai); } @Test public void testEmpty() {
// Path: src/main/java/com/github/jankroken/commandline/util/Constants.java // public static final String[] EMPTY_STRING_ARRAY = new String[]{}; // Path: src/test/java/com/github/jankroken/commandline/util/PeekIteratorTest.java import org.junit.jupiter.api.Test; import java.util.NoSuchElementException; import static ...
var ai = createIterator(EMPTY_STRING_ARRAY);
jankroken/commandline
src/test/java/com/github/jankroken/commandline/error/InvalidConfigurationTests.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.SIMPLE; import static com.github.jankroken.commandline.util.Constants....
package com.github.jankroken.commandline.error; public class InvalidConfigurationTests { @Test public void testMissingSwitches() {
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
assertThatThrownBy(() -> parse(MissingSwitchesConfiguration.class, EMPTY_STRING_ARRAY, SIMPLE))
jankroken/commandline
src/test/java/com/github/jankroken/commandline/error/InvalidConfigurationTests.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.SIMPLE; import static com.github.jankroken.commandline.util.Constants....
package com.github.jankroken.commandline.error; public class InvalidConfigurationTests { @Test public void testMissingSwitches() {
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
assertThatThrownBy(() -> parse(MissingSwitchesConfiguration.class, EMPTY_STRING_ARRAY, SIMPLE))
jankroken/commandline
src/test/java/com/github/jankroken/commandline/error/InvalidConfigurationTests.java
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException; import org.junit.jupiter.api.Test; import static com.github.jankroken.commandline.CommandLineParser.parse; import static com.github.jankroken.commandline.OptionStyle.SIMPLE; import static com.github.jankroken.commandline.util.Constants....
package com.github.jankroken.commandline.error; public class InvalidConfigurationTests { @Test public void testMissingSwitches() { assertThatThrownBy(() -> parse(MissingSwitchesConfiguration.class, EMPTY_STRING_ARRAY, SIMPLE))
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java // public class InvalidOptionConfigurationException extends CommandLineException { // private static final long serialVersionUID = 2L; // // public InvalidOptionConfigurationException(String message) { // ...
.isInstanceOf(InvalidOptionConfigurationException.class);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/model/SendTask.java
// Path: src/main/java/com/ystruct.middleware/stormmq/smq/Message.java // public class Message implements Serializable{ // //private static final long serialVersionUID = 5295808332504208830L; // private String topic; // private byte[] body; // private String msgId; // private long bornTime; // p...
import smq.Message; import java.io.Serializable;
package model; /** * Created by yang on 16-11-26. */ public class SendTask implements Serializable { private String groupId; //组id private String topic; //主题
// Path: src/main/java/com/ystruct.middleware/stormmq/smq/Message.java // public class Message implements Serializable{ // //private static final long serialVersionUID = 5295808332504208830L; // private String topic; // private byte[] body; // private String msgId; // private long bornTime; // p...
private Message message;
liuhangyang/StormMQ
src/main/test/DirectByteBuffer/directBytebuffer.java
// Path: src/main/java/com/ystruct.middleware/stormmq/store/MapedFile.java // public static void clean(final ByteBuffer buffer) { // if (buffer == null || !buffer.isDirect() || buffer.capacity() == 0) // return; // invoke(invoke(viewed(buffer), "cleaner"), "clean"); // // }
import java.nio.ByteBuffer; import static store.MapedFile.clean;
package DirectByteBuffer; /** * Created by yang on 16-11-27. */ public class directBytebuffer { public static void sleep(long i){ try { Thread.sleep(i); }catch (Exception e){ } } public static void main(String[] args) throws Exception{ ByteBuffer buffer = By...
// Path: src/main/java/com/ystruct.middleware/stormmq/store/MapedFile.java // public static void clean(final ByteBuffer buffer) { // if (buffer == null || !buffer.isDirect() || buffer.capacity() == 0) // return; // invoke(invoke(viewed(buffer), "cleaner"), "clean"); // // } // Path: src/main/test/Dir...
clean(buffer);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/producer/netty/StormProducerConnection.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import smq.SendCallback; import io.netty.channel.ChannelInboundHandlerAdapter; import model.InvokeFuture; import model.StormRequest;
package producer.netty; /** * Created by yang on 16-11-22. */ /** * producer和broker之间的连接. */ public interface StormProducerConnection { void init(); void connect(); void connect(String host,int port); void setHandler(ChannelInboundHandlerAdapter handler);
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
Object Send(StormRequest request);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/producer/netty/StormProducerConnection.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import smq.SendCallback; import io.netty.channel.ChannelInboundHandlerAdapter; import model.InvokeFuture; import model.StormRequest;
package producer.netty; /** * Created by yang on 16-11-22. */ /** * producer和broker之间的连接. */ public interface StormProducerConnection { void init(); void connect(); void connect(String host,int port); void setHandler(ChannelInboundHandlerAdapter handler); Object Send(StormRequest request);
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
void Send(StormRequest request, final SendCallback listener);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/producer/netty/StormProducerConnection.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import smq.SendCallback; import io.netty.channel.ChannelInboundHandlerAdapter; import model.InvokeFuture; import model.StormRequest;
package producer.netty; /** * Created by yang on 16-11-22. */ /** * producer和broker之间的连接. */ public interface StormProducerConnection { void init(); void connect(); void connect(String host,int port); void setHandler(ChannelInboundHandlerAdapter handler); Object Send(StormRequest request); ...
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
public InvokeFuture<Object> removeFuture(String key);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/producer/netty/StormHandler.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ConnectTimeoutException; import model.InvokeFuture; import model.StormResponse;
package producer.netty; /** * Created by yang on 16-11-22. */ public class StormHandler extends ChannelInboundHandlerAdapter{ private StormProducerConnection connect; private Throwable cause; private ConnectListener listener; public StormHandler(){ } public StormHandler(StormProducerConnect...
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
StormResponse response = (StormResponse)msg;
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/producer/netty/StormHandler.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ConnectTimeoutException; import model.InvokeFuture; import model.StormResponse;
package producer.netty; /** * Created by yang on 16-11-22. */ public class StormHandler extends ChannelInboundHandlerAdapter{ private StormProducerConnection connect; private Throwable cause; private ConnectListener listener; public StormHandler(){ } public StormHandler(StormProducerConnect...
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
InvokeFuture<Object> future = connect.removeFuture(key);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/consumer/netty/StormConsumerConnection.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import io.netty.channel.ChannelInboundHandlerAdapter; import model.InvokeFuture; import model.StormRequest;
package consumer.netty; /** * Created by yang on 16-11-24. */ public interface StormConsumerConnection { void init(); void connect(); void connect(String host,int port); void sethandle(ChannelInboundHandlerAdapter hanler);
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
Object Send(StormRequest request);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/consumer/netty/StormConsumerConnection.java
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
import io.netty.channel.ChannelInboundHandlerAdapter; import model.InvokeFuture; import model.StormRequest;
package consumer.netty; /** * Created by yang on 16-11-24. */ public interface StormConsumerConnection { void init(); void connect(); void connect(String host,int port); void sethandle(ChannelInboundHandlerAdapter hanler); Object Send(StormRequest request); void SendSync(StormRequest request...
// Path: src/main/java/com/ystruct.middleware/stormmq/model/InvokeFuture.java // public class InvokeFuture<T> { // private Semaphore semaphore = new Semaphore(0); // private T result; // private List<InvokeListener<T>> listeners = new ArrayList<InvokeListener<T>>(); // private String requestId; // p...
public InvokeFuture<Object> removeFuture(String key);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/consumer/netty/StormConsumerHandler.java
// Path: src/main/java/com/ystruct.middleware/stormmq/smq/ConsumeResult.java // public class ConsumeResult { // private ConsumeStatus status = ConsumeStatus.FAIL; // private String info; // private String groupID; // private String topic; // private String msgId; // // public ConsumeStatus getS...
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import model.*; import smq.ConsumeResult;
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { super.channelActive(ctx); } @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { // System.out.println("收到消息"); StormResponse response = (StormResponse)ms...
// Path: src/main/java/com/ystruct.middleware/stormmq/smq/ConsumeResult.java // public class ConsumeResult { // private ConsumeStatus status = ConsumeStatus.FAIL; // private String info; // private String groupID; // private String topic; // private String msgId; // // public ConsumeStatus getS...
ConsumeResult result = (ConsumeResult)listener.onResponse(response);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/broker/netty/AckSendThread.java
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
import broker.AckManager; import broker.SemaphoreManager; import io.netty.channel.Channel; import model.RequestResponseFromType; import model.ResponseType; import model.StormResponse; import smq.SendResult;
package broker.netty; /** * Created by yang on 16-12-1. */ public class AckSendThread implements Runnable { @Override public void run() { while (true){ // System.out.println("得到一个ack");
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
SemaphoreManager.descrease("Ack");//获取一个ACK的信号量
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/broker/netty/AckSendThread.java
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
import broker.AckManager; import broker.SemaphoreManager; import io.netty.channel.Channel; import model.RequestResponseFromType; import model.ResponseType; import model.StormResponse; import smq.SendResult;
package broker.netty; /** * Created by yang on 16-12-1. */ public class AckSendThread implements Runnable { @Override public void run() { while (true){ // System.out.println("得到一个ack"); SemaphoreManager.descrease("Ack");//获取一个ACK的信号量 // System.out.println("得到一个ack1"...
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
SendResult ack = AckManager.getAck();
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/broker/netty/AckSendThread.java
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
import broker.AckManager; import broker.SemaphoreManager; import io.netty.channel.Channel; import model.RequestResponseFromType; import model.ResponseType; import model.StormResponse; import smq.SendResult;
package broker.netty; /** * Created by yang on 16-12-1. */ public class AckSendThread implements Runnable { @Override public void run() { while (true){ // System.out.println("得到一个ack"); SemaphoreManager.descrease("Ack");//获取一个ACK的信号量 // System.out.println("得到一个ack1"...
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/AckManager.java // public class AckManager { // //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素 // private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>(); // private...
SendResult ack = AckManager.getAck();
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/tool/LogWriter.java
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/netty/Conf.java // public class Conf { // public static int connNum = 199; // public static AtomicInteger producerNum = new AtomicInteger(0); // public static Map<String/*topic*/,String> producerMap = new HashMap<String, String>(); // public s...
import broker.netty.Conf; import sun.security.util.DerEncoder; import java.io.*; import java.util.Date; import java.util.Properties;
package tool; /** * Created by yang on 16-12-1. */ /** * 日志工具类,使用了单例模式,保证只有一个实例, * 为了更方便的配置日志文件名,使用属性文件配置, * 也可以在程序指定日志文件名. */ public class LogWriter { //日志的配置文件 public static final String LOG_CONFIGFILE_NAME = "/home/yang/log.properties"; //日志文件名在配置文件中的标签 public static final String LOGFILE_TA...
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/netty/Conf.java // public class Conf { // public static int connNum = 199; // public static AtomicInteger producerNum = new AtomicInteger(0); // public static Map<String/*topic*/,String> producerMap = new HashMap<String, String>(); // public s...
System.out.println("getLogWriter:"+Conf.initValue++);
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/broker/netty/RecordThread.java
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/TaskManager.java // public class TaskManager { // private static ConcurrentLinkedQueue<SendTask> taskQueue = new ConcurrentLinkedQueue<SendTask>(); // //需要重新发送的队列 // private static ConcurrentLinkedQueue<SendTask> resendTaskQueue = new ConcurrentLi...
import broker.TaskManager;
package broker.netty; /** * Created by yang on 16-12-3. */ /** * 记录发送速度的线程,同时控制重发线程的启动. */ public class RecordThread implements Runnable { private int lastSpeed = 0; private int nowSpeed = 0; @Override public void run() { while (true){ lastSpeed = ResendManager.getSendSpeek(...
// Path: src/main/java/com/ystruct.middleware/stormmq/broker/TaskManager.java // public class TaskManager { // private static ConcurrentLinkedQueue<SendTask> taskQueue = new ConcurrentLinkedQueue<SendTask>(); // //需要重新发送的队列 // private static ConcurrentLinkedQueue<SendTask> resendTaskQueue = new ConcurrentLi...
if(TaskManager.getResendNumber() > 0 && ResendManager.resendThreadNumber == 0){
cobaltdev/pipeline
src/main/java/com/cobalt/bamboo/plugin/pipeline/cdperformance/CompletionStats.java
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Contributor.java // public class Contributor { // private String username; // private int commitCount; // private Date lastCommit; // private String fullname; // private String pictureUrl; // private String profilePageUrl; // // /** // * Const...
import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import j...
package com.cobalt.bamboo.plugin.pipeline.cdperformance; public class CompletionStats { private int buildNumber; private int numChanges; private Date completedDate;
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Contributor.java // public class Contributor { // private String username; // private int commitCount; // private Date lastCommit; // private String fullname; // private String pictureUrl; // private String profilePageUrl; // // /** // * Const...
private Map<String, Contributor> contributors;
cobaltdev/pipeline
src/test/java/com/cobalt/bamboo/plugin/pipeline/cdperformance/CDPerformanceFactoryTest.java
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/ContributorBuilder.java // public class ContributorBuilder { // private static final String JIRA_USER_AVATAR_PATH = "/secure/useravatar?ownerId="; // private static final String JIRA_PROFILE_PATH = "/secure/ViewProfile.jspa?name="; // // private Str...
import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import org.junit.*; import com.atlassian.applinks.api.ApplicationLink; import com.atlassian.bamboo.applin...
package com.cobalt.bamboo.plugin.pipeline.cdperformance; public class CDPerformanceFactoryTest { private Date day1; private Date day2; private Date day3; private Date day4; private Date day5; private Date current;
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/ContributorBuilder.java // public class ContributorBuilder { // private static final String JIRA_USER_AVATAR_PATH = "/secure/useravatar?ownerId="; // private static final String JIRA_PROFILE_PATH = "/secure/ViewProfile.jspa?name="; // // private Str...
ContributorBuilder cb;
cobaltdev/pipeline
src/main/java/com/cobalt/bamboo/plugin/pipeline/cdperformance/UptimeGrade.java
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Build.java // public class Build { // private ChainResultsSummary buildResult; // private ProgressBar progressBar; // // /** // * Constructs a Build object // * // * @param buildResult from Bamboo to construct off of // * @param progressBar ...
import java.util.Date; import com.cobalt.bamboo.plugin.pipeline.cdresult.Build;
Date current = new Date(); long totalUptimeToCurrent = this.totalUptime; if(currentBuildSuccess){ totalUptimeToCurrent += current.getTime() - currentBuildDate.getTime(); } return totalUptimeToCurrent * 1.0 / (current.getTime() - startDate.getTime()); } /** * Get the grade based on the uptime percenta...
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Build.java // public class Build { // private ChainResultsSummary buildResult; // private ProgressBar progressBar; // // /** // * Constructs a Build object // * // * @param buildResult from Bamboo to construct off of // * @param progressBar ...
public void update(Build newBuild) {
cobaltdev/pipeline
src/test/java/com/cobalt/bamboo/plugin/pipeline/cdperformance/UptimeGradeTest.java
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Build.java // public class Build { // private ChainResultsSummary buildResult; // private ProgressBar progressBar; // // /** // * Constructs a Build object // * // * @param buildResult from Bamboo to construct off of // * @param progressBar ...
import static org.junit.Assert.*; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Date; import org.junit.Test; import com.cobalt.bamboo.plugin.pipeline.cdresult.Build;
Date currentBuildDate = new Date(current.getTime() - 100000); Date startDate = new Date(current.getTime() - 200000); UptimeGrade g = new UptimeGrade(startDate, 0, false, currentBuildDate); assertEquals("Uptime percentage is not as expected.", 0, g.getUptimePercentage(), 0.0001); assertEquals("Grade is not as ...
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/Build.java // public class Build { // private ChainResultsSummary buildResult; // private ProgressBar progressBar; // // /** // * Constructs a Build object // * // * @param buildResult from Bamboo to construct off of // * @param progressBar ...
Build build = mock(Build.class);
cobaltdev/pipeline
src/test/java/com/cobalt/bamboo/plugin/pipeline/cdperformance/CDPerformanceAddAuthorsTest.java
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/ContributorBuilder.java // public class ContributorBuilder { // private static final String JIRA_USER_AVATAR_PATH = "/secure/useravatar?ownerId="; // private static final String JIRA_PROFILE_PATH = "/secure/ViewProfile.jspa?name="; // // private Str...
import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import org.junit.Before; import org.junit.Test; import com.atlassian.applinks.api.ApplicationL...
package com.cobalt.bamboo.plugin.pipeline.cdperformance; public class CDPerformanceAddAuthorsTest { private static final int COMMIT_LIST_SIZE = 10; // >= 3 CompletionStats stat;
// Path: src/main/java/com/cobalt/bamboo/plugin/pipeline/cdresult/ContributorBuilder.java // public class ContributorBuilder { // private static final String JIRA_USER_AVATAR_PATH = "/secure/useravatar?ownerId="; // private static final String JIRA_PROFILE_PATH = "/secure/ViewProfile.jspa?name="; // // private Str...
ContributorBuilder cb;
motech/MOTECH-WS-API
src/main/java/org/motechproject/ws/Patient.java
// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java // public enum PregnancyTrimester { // NONE, FIRST , SECOND , THIRD // }
import org.motechproject.ws.rct.PregnancyTrimester; import java.util.Date;
/** * MOTECH PLATFORM OPENSOURCE LICENSE AGREEMENT * * Copyright (c) 2010-11 The Trustees of Columbia University in the City of * New York and Grameen Foundation USA. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follo...
// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java // public enum PregnancyTrimester { // NONE, FIRST , SECOND , THIRD // } // Path: src/main/java/org/motechproject/ws/Patient.java import org.motechproject.ws.rct.PregnancyTrimester; import java.util.Date; /** * MOTECH PLATFORM OPENSOURCE LICE...
PregnancyTrimester pregnancyTrimester;
motech/MOTECH-WS-API
src/test/java/org/motechproject/ws/PatientTest.java
// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java // public enum PregnancyTrimester { // NONE, FIRST , SECOND , THIRD // }
import org.junit.Test; import org.motechproject.ws.rct.PregnancyTrimester; import java.util.Calendar; import java.util.Date; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue;
package org.motechproject.ws; public class PatientTest { @Test public void shouldDetermineIfPatientHasRegisteredPregnancy(){ Patient patient = new Patient(); assertFalse(patient.isPregnancyRegistered()); Patient pregnantPatient = new Patient(); pregnantPatient.setEstimateDue...
// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java // public enum PregnancyTrimester { // NONE, FIRST , SECOND , THIRD // } // Path: src/test/java/org/motechproject/ws/PatientTest.java import org.junit.Test; import org.motechproject.ws.rct.PregnancyTrimester; import java.util.Calendar; import j...
assertTrue(PregnancyTrimester.SECOND.equals(patient.pregnancyTrimester()));
motech/MOTECH-WS-API
src/main/java/org/motechproject/ws/server/RegistrarService.java
// Path: src/main/java/org/motechproject/ws/rct/RCTRegistrationConfirmation.java // public class RCTRegistrationConfirmation { // // private String text; // // private Boolean errors; // // public RCTRegistrationConfirmation() { // // } // // public RCTRegistrationConfirmation(String te...
import org.motechproject.ws.*; import org.motechproject.ws.rct.RCTRegistrationConfirmation; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import java.util.Date;
@WebParam(name = "facilityId") Integer facilityId, @WebParam(name = "firstName") String firstName, @WebParam(name = "lastName") String lastName, @WebParam(name = "preferredName"...
// Path: src/main/java/org/motechproject/ws/rct/RCTRegistrationConfirmation.java // public class RCTRegistrationConfirmation { // // private String text; // // private Boolean errors; // // public RCTRegistrationConfirmation() { // // } // // public RCTRegistrationConfirmation(String te...
public RCTRegistrationConfirmation registerForRCT(@WebParam(name = "staffId") Integer staffId,
cjh1/gerrit
gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/account/GroupAdminServiceImpl.java
// Path: gerrit-server/src/main/java/com/google/gerrit/server/account/GroupCache.java // public interface GroupCache { // public AccountGroup get(AccountGroup.Id groupId); // // public AccountGroup get(AccountGroup.NameKey name); // // public AccountGroup get(AccountGroup.UUID uuid); // // public Collection<...
import com.google.gerrit.common.data.GroupAdminService; import com.google.gerrit.common.data.GroupDetail; import com.google.gerrit.common.data.GroupList; import com.google.gerrit.common.data.GroupOptions; import com.google.gerrit.common.errors.InactiveAccountException; import com.google.gerrit.common.errors.NameAlready...
// Copyright (C) 2008 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
// Path: gerrit-server/src/main/java/com/google/gerrit/server/account/GroupCache.java // public interface GroupCache { // public AccountGroup get(AccountGroup.Id groupId); // // public AccountGroup get(AccountGroup.NameKey name); // // public AccountGroup get(AccountGroup.UUID uuid); // // public Collection<...
private final GroupCache groupCache;
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(releaseMe); } if (! directoryEntries.hasEntry(this.previousEntry)) directoryEntries.retainAdd(previousEntry); return this.previousEntry; } @Override public void remove() { throw new UnsupportedOperationException(); } @Override public Iterator<DirectoryEntry> ...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void addLink(Inode inode, String name) throws JExt2Exception, FileExists, NoSpaceLeftOnDevice, FileNameTooLong, TooManyLinks, FileTooLarge {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
directoryEntries.release(newEntry); accessData().unlockHierarchyChanges(); directoryLock.writeLock().unlock(); } public boolean isEmptyDirectory() { int count = 0; directoryLock.readLock().lock(); for (@SuppressWarnings("unused") DirectoryEntry dir : iterateDirectory()) { count += 1; if (count >=...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public DirectoryEntry lookup(String name) throws NoSuchFileOrDirectory, FileNameTooLong {
irq0/jext2
src/jext2/DirectoryInode.java
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import jext2.exceptions.NoSuchFileOrDirectory; import jext2.exceptions.TooManyLinks; import java.nio.ByteBuffer; import java.util.Date; import java.util.Iterator; i...
return true; } @Override public boolean isRegularFile() { return false; } /** * Unlink inode from directory. May cause inode destruction. Inode can * be any kind of inode except directories. * * @param inode inode to unlink * @param name name of the directory entry */ public void unLinkOt...
// Path: src/jext2/exceptions/DirectoryNotEmpty.java // public class DirectoryNotEmpty extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENOTEMPTY; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/FileExists....
public void unLinkDir(DirectoryInode inode, String name) throws JExt2Exception, DirectoryNotEmpty {
irq0/jext2
src/jext2/JExt2.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import jext2.exceptions.IoError; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.channels.FileChannel;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
} catch (IoError e) {
irq0/jext2
src/jext2/DataBlockAccess.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import jext2.annotations.MustReturnLock; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Date; import ...
public class DataBlockIterator implements Iterator<Long>, Iterable<Long>{ Inode inode; long remaining; long current; int locks; LinkedList<Long> blocks; /* cache for block nrs */ DataBlockIterator(DataInode inode, long start) { this.inode = inode; this.current = start; this.remaining = inode.getB...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
} catch (FileTooLarge e) {
irq0/jext2
src/jext2/DataBlockAccess.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import jext2.annotations.MustReturnLock; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Date; import ...
DataBlockIterator(DataInode inode) { this(inode , -1); } @Override public boolean hasNext() { fetchNext(); return ((remaining > 0) || ((blocks != null) && (blocks.size() > 0))); } private void fetchNext() { try { if (remaining > 0) { /* still blocks to fetch */ if (blocks == null || ...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
} catch (JExt2Exception e) {
irq0/jext2
src/jext2/DataBlockAccess.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import jext2.annotations.MustReturnLock; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Date; import ...
throw new RuntimeException("blockToPath: file block number < 0"); } else if (fileBlockNr < Constants.EXT2_NDIR_BLOCKS) { return new int[] { (int)fileBlockNr }; } else if ((fileBlockNr -= directBlocks) < indirectBlocks) { return new int[] { Constants.EXT2_IND_BLOCK, (int)fileBlockNr }; } else if ((fi...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
private long[] getBranch(int[] offsets) throws IoError {
irq0/jext2
src/jext2/DataBlockAccess.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import jext2.annotations.MustReturnLock; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Date; import ...
/* No such thing, so let's try location of indirect block */ if (depth > 1) return blockNrs[depth-1]; /* It is going to be refered from inode itself? OK just put i into * the same cylinder group then */ long bgStart = BlockGroupDescriptor.firstBlock(inode.getBlockGroup()); long colour = (Filesystem...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
throws JExt2Exception, NoSpaceLeftOnDevice {
irq0/jext2
src/jext2/InodeAccess.java
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
import java.nio.ByteBuffer; import java.util.logging.Level; import jext2.exceptions.InvalidArgument; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSuchFileOrDirectory;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
public static Inode readFromByteBuffer(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/InodeAccess.java
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
import java.nio.ByteBuffer; import java.util.logging.Level; import jext2.exceptions.InvalidArgument; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSuchFileOrDirectory;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
public static Inode readByIno(long ino) throws IoError, InvalidArgument {
irq0/jext2
src/jext2/InodeAccess.java
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
import java.nio.ByteBuffer; import java.util.logging.Level; import jext2.exceptions.InvalidArgument; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSuchFileOrDirectory;
Inode inode = InodeAccess.readFromByteBuffer(rawInode); // TODO check for NOENT exception inode.setBlockGroup(group); inode.setIno(ino); inode.setBlockNr(absBlock); inode.setOffset(relOffset); return inode; } public static InodeAccess getInstance() { return _instance; } public static Inode rea...
// Path: src/jext2/exceptions/InvalidArgument.java // public class InvalidArgument extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EINVAL; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // pu...
public Inode openInode(long ino) throws JExt2Exception {
irq0/jext2
src/fusejext2/FuseJExt2.java
// Path: src/jext2/Filesystem.java // public class Filesystem { // private static Charset charset = Charset.defaultCharset(); // private static Logger logger; // // static class Jext2Formatter extends Formatter { // private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); // // @Ov...
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.reflect.Constructor; import java.nio.channels.FileChannel; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; import java.util.Arrays; import java.u...
} catch (IOException e) { System.err.println(Arrays.toString(e.getStackTrace())); System.err.println(e.getLocalizedMessage()); } } private void shutdownThreadPool() { logger.info("Shutting down thread pool"); service.shutdown(); try { logger.info("Waiting for "+ (service.getActiv...
// Path: src/jext2/Filesystem.java // public class Filesystem { // private static Charset charset = Charset.defaultCharset(); // private static Logger logger; // // static class Jext2Formatter extends Formatter { // private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); // // @Ov...
for (Handler h : Filesystem.getLogger().getHandlers()) {
irq0/jext2
src/fusejext2/tasks/Read.java
// Path: src/jext2/RegularInode.java // public class RegularInode extends DataInode { // protected RegularInode(long blockNr, int offset) throws IoError { // super(blockNr, offset); // } // // public static RegularInode fromByteBuffer(ByteBuffer buf, int offset) throws IoError { // RegularInode inode = new Regu...
import java.nio.ByteBuffer; import jext2.RegularInode; import jext2.exceptions.JExt2Exception; import jlowfuse.FuseReq; import jlowfuse.Reply; import fuse.FileInfo; import fusejext2.Jext2Context;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/RegularInode.java // public class RegularInode extends DataInode { // protected RegularInode(long blockNr, int offset) throws IoError { // super(blockNr, offset); // } // // public static RegularInode fromByteBuffer(ByteBuffer buf, int offset) throws IoError { // RegularInode inode = new Regu...
RegularInode inode = (RegularInode)(context.inodes.getOpened(ino));
irq0/jext2
src/fusejext2/tasks/Read.java
// Path: src/jext2/RegularInode.java // public class RegularInode extends DataInode { // protected RegularInode(long blockNr, int offset) throws IoError { // super(blockNr, offset); // } // // public static RegularInode fromByteBuffer(ByteBuffer buf, int offset) throws IoError { // RegularInode inode = new Regu...
import java.nio.ByteBuffer; import jext2.RegularInode; import jext2.exceptions.JExt2Exception; import jlowfuse.FuseReq; import jlowfuse.Reply; import fuse.FileInfo; import fusejext2.Jext2Context;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/RegularInode.java // public class RegularInode extends DataInode { // protected RegularInode(long blockNr, int offset) throws IoError { // super(blockNr, offset); // } // // public static RegularInode fromByteBuffer(ByteBuffer buf, int offset) throws IoError { // RegularInode inode = new Regu...
} catch (JExt2Exception e) {
irq0/jext2
src/jext2/InodeAlloc.java
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.util.logging.Level; import java.util.logging.Logger;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
public static int findGroupDir(Inode parent) throws NoSpaceLeftOnDevice {
irq0/jext2
src/jext2/InodeAlloc.java
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDevice; import java.util.logging.Level; import java.util.logging.Logger;
* * If there are block groups with both free inodes and free blocks counts * not worse than average we return one with smallest directory count. * Otherwise we simply return a random group. * * For the rest rules look so: * * It's OK to put directory into a group unless * it has too many directories a...
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
static void freeInode(Inode inode) throws JExt2Exception {
irq0/jext2
src/jext2/Bitmap.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import jext2.exceptions.IoError; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.concurrent.locks.ReentrantLock;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
protected void read(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/exceptions/JExt2Exception.java
// Path: src/jext2/Filesystem.java // public class Filesystem { // private static Charset charset = Charset.defaultCharset(); // private static Logger logger; // // static class Jext2Formatter extends Formatter { // private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); // // @Ov...
import jext2.Filesystem; import java.util.logging.Level; import java.util.logging.Logger;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/Filesystem.java // public class Filesystem { // private static Charset charset = Charset.defaultCharset(); // private static Logger logger; // // static class Jext2Formatter extends Formatter { // private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); // // @Ov...
Logger logger = Filesystem.getLogger();
irq0/jext2
src/jext2/DirectoryEntryAccess.java
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
import jext2.exceptions.JExt2Exception;
result = d.value; d.unlock(); } else { d = new Data(); d.lock(); d.usage = 1; d.value = entry; result = entry; table.put(entry.getName(), d); d.unlock(); } return result; } public boolean hasEntry(DirectoryEntry entry) { assert entry != null; if (entry.isUnused()) return tru...
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
protected DirectoryEntry createInstance(String key) throws JExt2Exception {
irq0/jext2
src/fusejext2/tasks/Destroy.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import fusejext2.Jext2Context; import java.util.Date; import jext2.exceptions.IoError;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
} catch (IoError e) {
irq0/jext2
src/jext2/DirectoryEntry.java
// Path: src/jext2/exceptions/FileNameTooLong.java // public class FileNameTooLong extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENAMETOOLONG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java...
import java.nio.ByteBuffer; import jext2.exceptions.FileNameTooLong; import jext2.exceptions.IoError; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle;
public boolean isRegularFile() { return getFileType() == FILETYPE_REG_FILE; } public boolean isDirectory() { return getFileType() == FILETYPE_DIR; } public boolean isCharacterDevice() { return getFileType() == FILETYPE_CHRDEV; } public boolean isBlockDevice() { return getFileType() == FILETYPE_BLKDEV...
// Path: src/jext2/exceptions/FileNameTooLong.java // public class FileNameTooLong extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENAMETOOLONG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java...
protected void read(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/DirectoryEntry.java
// Path: src/jext2/exceptions/FileNameTooLong.java // public class FileNameTooLong extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENAMETOOLONG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java...
import java.nio.ByteBuffer; import jext2.exceptions.FileNameTooLong; import jext2.exceptions.IoError; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle;
} public boolean isSocket() { return getFileType() == FILETYPE_SOCK; } public boolean isSymlink() { return getFileType() == FILETYPE_SYMLINK; } @Override protected void read(ByteBuffer buf) throws IoError { this.ino = Ext2fsDataTypes.getLE32U(buf, offset); this.recLen = Ext2fsDataTypes.getLE16U(buf, 4...
// Path: src/jext2/exceptions/FileNameTooLong.java // public class FileNameTooLong extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.ENAMETOOLONG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java...
public static DirectoryEntry create(String name) throws FileNameTooLong {
irq0/jext2
src/jext2/SymlinkInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; impo...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
private String readSlowSymlink() throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/SymlinkInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; impo...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
private String readSlowSymlink() throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/SymlinkInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; impo...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
private void writeSlowSymlink(String link, int size) throws JExt2Exception, NoSpaceLeftOnDevice, FileTooLarge {
irq0/jext2
src/jext2/SymlinkInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; impo...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
private String readFastSymlink(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/Superblock.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.util.UUID; import java.util.Date; import jext2.exceptions.IoError; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.buil...
} public final void setMountCount(int mountCount) { this.mountCount = mountCount; } public final void setMaxMountCount(int maxMountCount) { this.maxMountCount = maxMountCount; } public final void setLastMount(Date lastMount) { this.lastMount = lastMount; } public final void setLastWrite(Date lastWrite) {...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
protected void read(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/RegularInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception;
public boolean isDirectory() { return false; } @Override public boolean isRegularFile() { return true; } /** * Set size. For regular inodes the size is stored in i_size and i_dir_acl * */ @Override public void setSize(long newsize) { super.setSize(newsize & Ext2fsDataTypes.LE32_MAX); super.setDi...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public void setSizeAndTruncate(long size) throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/RegularInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import jext2.annotations.NotThreadSafe; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception;
public boolean isDirectory() { return false; } @Override public boolean isRegularFile() { return true; } /** * Set size. For regular inodes the size is stored in i_size and i_dir_acl * */ @Override public void setSize(long newsize) { super.setSize(newsize & Ext2fsDataTypes.LE32_MAX); super.setDi...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public void setSizeAndTruncate(long size) throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/BlockGroupDescriptor.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import java.nio.ByteBuffer; import jext2.exceptions.IoError; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle;
} public final int getUsedDirsCount() { return this.usedDirsCount; } public final int getBlockGroup() { return this.blockGroup; } void setBlockGroup(int blockGroup) { this.blockGroup = blockGroup; } public void setFreeBlocksCount(int freeBlocksCount) { this.freeBlocksCount = freeBlocksCount; } public ...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
protected void read(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/DataInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.LinkedList; import java.util.logging.Logger; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDev...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public ByteBuffer readData(int size, long fileOffset) throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/DataInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.LinkedList; import java.util.logging.Logger; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDev...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public ByteBuffer readData(int size, long fileOffset) throws JExt2Exception, FileTooLarge {
irq0/jext2
src/jext2/DataInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.LinkedList; import java.util.logging.Logger; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDev...
} catch (IllegalMonitorStateException e) { Logger log = Filesystem.getLogger(); log.warning("IllegalMonitorStateException encountered in readData, inode=" + this); log.warning(String.format("context for exception: blocks=%s i=%d approxBlocks=%d off=%d buf=%s readlock=%s lock.readlock.holds=%s", ...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public int writeData(ByteBuffer buf, long offset) throws JExt2Exception, NoSpaceLeftOnDevice, FileTooLarge {
irq0/jext2
src/jext2/DataInode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import java.nio.ByteBuffer; import java.util.Date; import java.util.LinkedList; import java.util.logging.Logger; import org.apache.commons.lang.builder.HashCodeBuilder; import jext2.exceptions.FileTooLarge; import jext2.exceptions.IoError; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSpaceLeftOnDev...
blockAccess.writeFromBufferUnsynchronized((blockNrs.getFirst() & 0xffffffff) * blocksize, onDisk); } else { /* write whole block */ buf.limit(buf.position() + blocksize); blockAccess.writeFromBufferUnsynchronized( (blockNrs.getFirst() & 0xffffffff) * blocksize, buf); } start += 1; startO...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
protected void read(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/Inode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import java.util.Date; import java.nio.ByteBuffer; import jext2.exceptions.FileTooLarge; import jext...
} public final void setModificationTime(Date modificationTime) { this.modificationTime = modificationTime; } public final void setDeletionTime(Date deletionTime) { this.deletionTime = deletionTime; } public final void setLinksCount(int linksCount) { this.linksCount = (linksCount < 0) ? 0 : linksCount ; } ...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
protected void write(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/Inode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import java.util.Date; import java.nio.ByteBuffer; import jext2.exceptions.FileTooLarge; import jext...
return new EqualsBuilder() .append(ino, other.ino) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder() .appendSuper(super.hashCode()) .append(mode.numeric()) .append(getGid()) .append(getUid()) .append(size) .append(accessTime) .append(changeTime) .append(modificati...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
public synchronized void delete() throws JExt2Exception {
irq0/jext2
src/jext2/Inode.java
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import java.util.Date; import java.nio.ByteBuffer; import jext2.exceptions.FileTooLarge; import jext...
.append(size) .append(accessTime) .append(changeTime) .append(modificationTime) .append(deletionTime) .append(linksCount) .append(flags) .append(generation) .append(fileAcl) .append(dirAcl) .append(fragmentAddress) .append(blockGroup) .append(ino).toHashCode(); } /** * Delete Inode */ ...
// Path: src/jext2/exceptions/FileTooLarge.java // public class FileTooLarge extends JExt2Exception { // static final long serialVersionUID = 42; // protected final static int ERRNO = Errno.EFBIG; // // public int getErrno() { // return ERRNO; // } // } // // Path: src/jext2/exceptions/IoError.java // public cl...
} catch (FileTooLarge e) {
irq0/jext2
src/jext2/BitmapAccess.java
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
import java.nio.ByteBuffer; import jext2.exceptions.JExt2Exception;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/JExt2Exception.java // public class JExt2Exception extends Exception { // protected static final int ERRNO = -1; // // private static final long serialVersionUID = -7429088074385678308L; // // Logger logger = Filesystem.getLogger(); // // public JExt2Exception() { // log(""); // ...
public Bitmap openInodeBitmap(BlockGroupDescriptor group) throws JExt2Exception{
irq0/jext2
src/jext2/Block.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import java.nio.*; import jext2.exceptions.IoError; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
protected void write(ByteBuffer buf) throws IoError {
irq0/jext2
src/jext2/BlockAccess.java
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.channels.FileChannel; import java.util.LinkedList; import jext2.annotations.NotThreadSafe; import jext2.exceptions.IoError;
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later vers...
// Path: src/jext2/exceptions/IoError.java // public class IoError extends JExt2Exception { // static final long serialVersionUID = 42; // protected static final int ERRNO=Errno.EIO; // public IoError(String msg) { // super(msg); // } // public IoError() { // super(); // } // public int getErrno() { // ret...
public ByteBuffer read(long nr) throws IoError {
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/sqlgenerator/DropPrimaryKeyGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext.spanner.ICloudSpanner; import liquibase.sqlgenerator.SqlGenerator; import liquibase.sqlgenerator.SqlGeneratorChain; import liquibase.sqlgenerator.core.DropPrimaryKeyGenerator; import liquibase.statement.core.DropPrimar...
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/sqlgenerator/DropPrimaryKeyGeneratorSpanner.java import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext....
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/datatype/TimestampTypeSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.DateTimeType; import liquibase.ext.spanner.ICloudSpanner; import liquibase.database.Database;
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/datatype/TimestampTypeSpanner.java import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.DateTimeType; import liquibase.ext.spanne...
return database instanceof ICloudSpanner;
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/change/DropAllForeignKeyConstraintsChangeSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import com.google.common.base.MoreObjects; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import liquibase.change.ChangeMetaData; import liquibase.change.DatabaseChange; import liquibase.change.core....
package liquibase.ext.spanner.change; @DatabaseChange(name="dropAllForeignKeyConstraints", description = "Drops all foreign key constraints for a table", priority = ChangeMetaData.PRIORITY_DATABASE, appliesTo = "table") public class DropAllForeignKeyConstraintsChangeSpanner extends DropAllForeignKeyConstraintsChange ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/change/DropAllForeignKeyConstraintsChangeSpanner.java import com.google.common.base.MoreObjects; import java.sql.PreparedStatement; import java.sql.Res...
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/datatype/BigIntTypeSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.BigIntType; import liquibase.ext.spanner.ICloudSpanner; import liquibase.database.Database;
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/datatype/BigIntTypeSpanner.java import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.BigIntType; import liquibase.ext.spanner.ICl...
return database instanceof ICloudSpanner;
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/sqlgenerator/CreateViewGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import java.util.ArrayList; import java.util.List; import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext.spanner.ICloudSpanner; import liquibase.sql.Sql; import liquibase.sql.UnparsedSql; import liquibase.sqlgenerator.SqlGenerator; import liquibase.sqlgenerator.SqlGenerat...
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/sqlgenerator/CreateViewGeneratorSpanner.java import java.util.ArrayList; import java.util.List; import liquibase.database.Database; import liquibase.ex...
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/sqlgenerator/CreateProcedureGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.exception.UnexpectedLiquibaseException; import liquibase.exception.ValidationErrors; import liquibase.ext.spanner.ICloudSpanner; import liquibase.sql.Sql; import liquibase.sqlgenerator.SqlGenerator; import liquibase.sqlgenerator.SqlGeneratorChain; import liquibase.sq...
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/sqlgenerator/CreateProcedureGeneratorSpanner.java import liquibase.database.Database; import liquibase.exception.UnexpectedLiquibaseException; import l...
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/sqlgenerator/DropDefaultValueGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext.spanner.ICloudSpanner; import liquibase.sqlgenerator.SqlGenerator; import liquibase.sqlgenerator.SqlGeneratorChain; import liquibase.sqlgenerator.core.DropDefaultValueGenerator; import liquibase.statement.core.DropDefa...
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/sqlgenerator/DropDefaultValueGeneratorSpanner.java import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ex...
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/sqlgenerator/RenameColumnGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext.spanner.ICloudSpanner; import liquibase.sqlgenerator.SqlGenerator; import liquibase.sqlgenerator.SqlGeneratorChain; import liquibase.sqlgenerator.core.RenameColumnGenerator; import liquibase.statement.core.RenameColumn...
/** * Copyright 2020 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/sqlgenerator/RenameColumnGeneratorSpanner.java import liquibase.database.Database; import liquibase.exception.ValidationErrors; import liquibase.ext.sp...
return (database instanceof ICloudSpanner);
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/datatype/ModifyDataTypeGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.sqlgenerator.core.ModifyDataTypeGenerator; import liquibase.statement.core.ModifyDataTypeStatement; import com.google.common.base.MoreObjects; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import liquibase.database.Database; import liquibase.database.jvm.Jd...
/** * Copyright 2020 Google LLC * * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * <p> * https://www.apache.org/licenses/LICENSE-2.0 * * <p> * Unless required by applicable la...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/datatype/ModifyDataTypeGeneratorSpanner.java import liquibase.sqlgenerator.core.ModifyDataTypeGenerator; import liquibase.statement.core.ModifyDataType...
return database instanceof ICloudSpanner;
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/snapshotgenerator/ForeignKeySnapshotGeneratorSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.exception.DatabaseException; import liquibase.ext.spanner.ICloudSpanner; import liquibase.snapshot.DatabaseSnapshot; import liquibase.snapshot.InvalidExampleException; import liquibase.snapshot.SnapshotGenerator; import liquibase.snapshot.SnapshotGeneratorChain; impo...
/** * Copyright 2021 Google LLC * * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * <p>https://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed ...
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/snapshotgenerator/ForeignKeySnapshotGeneratorSpanner.java import liquibase.database.Database; import liquibase.exception.DatabaseException; import liqu...
if (database instanceof ICloudSpanner) {
cloudspannerecosystem/liquibase-spanner
src/main/java/liquibase/ext/spanner/datatype/DoubleTypeSpanner.java
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // }
import liquibase.database.Database; import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.DoubleType; import liquibase.ext.spanner.ICloudSpanner;
package liquibase.ext.spanner.datatype; public class DoubleTypeSpanner extends DoubleType { private static final DatabaseDataType FLOAT64 = new DatabaseDataType("FLOAT64"); @Override public boolean supports(Database database) {
// Path: src/main/java/liquibase/ext/spanner/ICloudSpanner.java // public interface ICloudSpanner extends Database { // } // Path: src/main/java/liquibase/ext/spanner/datatype/DoubleTypeSpanner.java import liquibase.database.Database; import liquibase.datatype.DatabaseDataType; import liquibase.datatype.core.DoubleTy...
return database instanceof ICloudSpanner;