org.apache.flink.util.WrappingProxyUtil Java Examples

The following examples show how to use org.apache.flink.util.WrappingProxyUtil. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SafetyNetCloseableRegistry.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
PhantomDelegatingCloseableRef(
	WrappingProxyCloseable<? extends Closeable> referent,
	SafetyNetCloseableRegistry closeableRegistry,
	ReferenceQueue<? super WrappingProxyCloseable<? extends Closeable>> q) {

	super(referent, q);
	this.innerCloseable = Preconditions.checkNotNull(WrappingProxyUtil.stripProxy(referent));
	this.closeableRegistry = Preconditions.checkNotNull(closeableRegistry);
	this.debugString = referent.toString();
}
 
Example #2
Source File: FileSystemTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private static FileSystem getFileSystemWithoutSafetyNet(final String uri) throws URISyntaxException, IOException {
	final FileSystem fileSystem = FileSystem.get(new URI(uri));

	if (fileSystem instanceof WrappingProxy) {
		//noinspection unchecked
		return WrappingProxyUtil.stripProxy((WrappingProxy<FileSystem>) fileSystem);
	}

	return fileSystem;
}
 
Example #3
Source File: SafetyNetCloseableRegistry.java    From flink with Apache License 2.0 5 votes vote down vote up
PhantomDelegatingCloseableRef(
	WrappingProxyCloseable<? extends Closeable> referent,
	SafetyNetCloseableRegistry closeableRegistry,
	ReferenceQueue<? super WrappingProxyCloseable<? extends Closeable>> q) {

	super(referent, q);
	this.innerCloseable = Preconditions.checkNotNull(WrappingProxyUtil.stripProxy(referent));
	this.closeableRegistry = Preconditions.checkNotNull(closeableRegistry);
	this.debugString = referent.toString();
}
 
Example #4
Source File: FileSystemTest.java    From flink with Apache License 2.0 5 votes vote down vote up
private static FileSystem getFileSystemWithoutSafetyNet(final String uri) throws URISyntaxException, IOException {
	final FileSystem fileSystem = FileSystem.get(new URI(uri));

	if (fileSystem instanceof WrappingProxy) {
		//noinspection unchecked
		return WrappingProxyUtil.stripProxy((WrappingProxy<FileSystem>) fileSystem);
	}

	return fileSystem;
}
 
Example #5
Source File: SafetyNetCloseableRegistry.java    From flink with Apache License 2.0 5 votes vote down vote up
PhantomDelegatingCloseableRef(
	WrappingProxyCloseable<? extends Closeable> referent,
	SafetyNetCloseableRegistry closeableRegistry,
	ReferenceQueue<? super WrappingProxyCloseable<? extends Closeable>> q) {

	super(referent, q);
	this.innerCloseable = Preconditions.checkNotNull(WrappingProxyUtil.stripProxy(referent));
	this.closeableRegistry = Preconditions.checkNotNull(closeableRegistry);
	this.debugString = referent.toString();
}
 
Example #6
Source File: FileSystemTest.java    From flink with Apache License 2.0 5 votes vote down vote up
private static FileSystem getFileSystemWithoutSafetyNet(final String uri) throws URISyntaxException, IOException {
	final FileSystem fileSystem = FileSystem.get(new URI(uri));

	if (fileSystem instanceof WrappingProxy) {
		//noinspection unchecked
		return WrappingProxyUtil.stripProxy((WrappingProxy<FileSystem>) fileSystem);
	}

	return fileSystem;
}