summaryrefslogtreecommitdiff
path: root/libjava/gnu/gcj/runtime/PersistentByteMap.h
blob: 1bac1d2c0863e7062c7f6b59dc8dcf41b5ae63cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_gcj_runtime_PersistentByteMap__
#define __gnu_gcj_runtime_PersistentByteMap__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace gcj
    {
      namespace runtime
      {
          class PersistentByteMap;
          class PersistentByteMap$AccessMode;
      }
    }
  }
  namespace java
  {
    namespace nio
    {
        class MappedByteBuffer;
      namespace channels
      {
          class FileChannel;
      }
    }
  }
}

class gnu::gcj::runtime::PersistentByteMap : public ::java::lang::Object
{

  PersistentByteMap(::java::io::File *);
public:
  PersistentByteMap(::java::lang::String *, ::gnu::gcj::runtime::PersistentByteMap$AccessMode *);
  PersistentByteMap(::java::io::File *, ::gnu::gcj::runtime::PersistentByteMap$AccessMode *);
private:
  void init(::gnu::gcj::runtime::PersistentByteMap *, ::java::io::File *, jint, jint);
public:
  static ::gnu::gcj::runtime::PersistentByteMap * emptyPersistentByteMap(::java::io::File *, jint, jint);
private:
  jint getWord(jint);
  void putWord(jint, jint);
public:
  virtual ::java::util::Set * entrySet();
private:
  jint getBucket(jint);
  jint getKeyPos(jint);
  jint getValuePos(jint);
  void putKeyPos(jint, jint);
  void putValuePos(jint, jint);
  JArray< jbyte > * getBytes(jint);
  jint hash(JArray< jbyte > *);
public:
  virtual JArray< jbyte > * get(JArray< jbyte > *);
  virtual void put(JArray< jbyte > *, JArray< jbyte > *);
private:
  jint addBytes(JArray< jbyte > *);
public:
  virtual ::java::util::Iterator * iterator(jint);
  virtual jint size();
  virtual jint stringTableSize();
  virtual jint capacity();
  virtual void force();
  virtual ::java::io::File * getFile();
  virtual void close();
  virtual void putAll(::gnu::gcj::runtime::PersistentByteMap *);
public: // actually package-private
  static jint access$0(::gnu::gcj::runtime::PersistentByteMap *);
  static jint access$1(::gnu::gcj::runtime::PersistentByteMap *);
  static jint access$2(::gnu::gcj::runtime::PersistentByteMap *, jint);
  static jint access$3(::gnu::gcj::runtime::PersistentByteMap *, jint);
  static JArray< jbyte > * access$4(::gnu::gcj::runtime::PersistentByteMap *, jint);
private:
  ::java::nio::MappedByteBuffer * __attribute__((aligned(__alignof__( ::java::lang::Object)))) buf;
  static const jint MAGIC = 0;
  static const jint VERSION = 4;
  static const jint CAPACITY = 8;
  static const jint TABLE_BASE = 12;
  static const jint STRING_BASE = 16;
  static const jint STRING_SIZE = 20;
  static const jint FILE_SIZE = 24;
  static const jint ELEMENTS = 28;
  static const jint INT_SIZE = 4;
  static const jint TABLE_ENTRY_SIZE = 8;
  jint capacity__;
  jint table_base;
  jint string_base;
  jint string_size;
  jint file_size;
  jint elements;
  jlong length;
  ::java::io::File * name;
  static const jint UNUSED_ENTRY = -1;
public:
  static const jint KEYS = 0;
  static const jint VALUES = 1;
  static const jint ENTRIES = 2;
private:
  ::java::util::HashMap * values;
public: // actually package-private
  ::java::nio::channels::FileChannel * fc;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_gcj_runtime_PersistentByteMap__