]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | /* |
2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
3 | * contributor license agreements. See the NOTICE file distributed with | |
4 | * this work for additional information regarding copyright ownership. | |
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
6 | * (the "License"); you may not use this file except in compliance with | |
7 | * the License. You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | */ | |
17 | ||
18 | package org.apache.arrow.plasma; | |
19 | ||
20 | import java.nio.ByteBuffer; | |
21 | ||
22 | import org.apache.arrow.plasma.exceptions.DuplicateObjectException; | |
23 | import org.apache.arrow.plasma.exceptions.PlasmaOutOfMemoryException; | |
24 | ||
25 | /** | |
26 | * JNI static methods for PlasmaClient. | |
27 | */ | |
28 | public class PlasmaClientJNI { | |
29 | ||
30 | public static native long connect(String storeSocketName, String managerSocketName, int releaseDelay); | |
31 | ||
32 | public static native void disconnect(long conn); | |
33 | ||
34 | public static native ByteBuffer create(long conn, byte[] objectId, int size, byte[] metadata) | |
35 | throws DuplicateObjectException, PlasmaOutOfMemoryException; | |
36 | ||
37 | public static native byte[] hash(long conn, byte[] objectId); | |
38 | ||
39 | public static native void seal(long conn, byte[] objectId); | |
40 | ||
41 | public static native void release(long conn, byte[] objectId); | |
42 | ||
43 | public static native ByteBuffer[][] get(long conn, byte[][] objectIds, int timeoutMs); | |
44 | ||
45 | public static native void delete(long conn, byte[] objectId); | |
46 | ||
47 | public static native boolean contains(long conn, byte[] objectId); | |
48 | ||
49 | public static native void fetch(long conn, byte[][] objectIds); | |
50 | ||
51 | public static native byte[][] wait(long conn, byte[][] objectIds, int timeoutMs, | |
52 | int numReturns); | |
53 | ||
54 | public static native long evict(long conn, long numBytes); | |
55 | ||
56 | public static native byte[][] list(long conn); | |
57 | } |