Ejemplo n.º 1
0
                               TryReindexException,
                               IndexPreconditionsException)

import os
import marshal
import io
import struct
import shutil
import codecs
import hashlib

from CodernityDB3.storage import IU_Storage, DummyStorage

from CodernityDB3.env import cdb_environment

if cdb_environment.get('rlock_obj'):
    from CodernityDB3 import patch
    patch.patch_cache_rr(cdb_environment['rlock_obj'])

from CodernityDB3.rr_cache import cache1lvl


from CodernityDB3.misc import random_hex_32

try:
    from CodernityDB3 import __version__
except ImportError:
    from .__init__ import __version__


class IU_HashIndex(Index):
Ejemplo n.º 2
0
from CodernityDB3.index import (Index, IndexException, DocIdNotFound,
                                ElemNotFound, TryReindexException,
                                IndexPreconditionsException)

import os
import marshal
import io
import struct
import shutil

from CodernityDB3.storage import IU_Storage, DummyStorage

from CodernityDB3.env import cdb_environment

if cdb_environment.get('rlock_obj'):
    from CodernityDB3 import patch
    patch.patch_cache_rr(cdb_environment['rlock_obj'])

from CodernityDB3.rr_cache import cache1lvl

from CodernityDB3.misc import random_hex_32

try:
    from CodernityDB3 import __version__
except ImportError:
    from .__init__ import __version__


class IU_HashIndex(Index):
    """