GemStone Kernel Objects

Previous chapter

Next chapter

This appendix describes the predefined objects that are located in a freshly installed GemStone/S 64 Bit repository.

Non-Numeric Constants

The following non-numeric constants are defined in the Globals dictionary and protected by the SystemObjectSecurityPolicy:

Numeric Constants

Floating point constants are instances of class Float or class DecimalFloat. They are defined in the Globals dictionary and are protected by the SystemObjectSecurityPolicy. Refer to the Programming Guide for more information on these values.

DecimalPlusInfinity
DecimalMinusInfinity
DecimalPlusQuietNaN
DecimalMinusQuietNaN
DecimalPlusSignalingNaN
DecimalMinusSignalingNaN
PlusInfinity
MinusInfinity
PlusQuietNaN
MinusQuietNaN
PlusSignalingNaN
MinusSignalingNaN

Repository and GsObjectSecurityPolicies

The Repository is the root of a GemStone system. This structure contains the GsObjectSecurityPolicies, which implement object-level security. For more information, refer to the Programming Guide for more information on the meaning and use of these objects.

SystemRepository. This single instance of Repository is defined in the Globals dictionary. Repository is a subclass of Collection, and the indexable part of SystemRepository contains references to all the security policies (all the instances of GsObjectSecurityPolicy) in GemStone.

The SystemRepository object initially contains eight security policies, three of which are public and named: the SystemObjectSecurityPolicy (owned by the SystemUser), the DataCuratorObjectSecurityPolicy (owned by the DataCurator), and the PublishedObjectSecurityPolicy (owned by SystemUser). The SystemRepository object itself is protected by the DataCuratorObjectSecurityPolicy. New GsObjectSecurityPolicies may be created and added to the SystemRepository object, using the methods new, newInRepository:, or by some methods that create new users.

For more on GsObjectSecurityPolicies, see the Programming Guide for GemStone/S 64 Bit.

SystemObjectSecurityPolicy. This security policy is defined in the Globals dictionary. For backwards compatibility, the key #SystemSegment also refers to this security policy, and may be used in upgraded repositories. The SystemObjectSecurityPolicy object itself is protected by the DataCuratorObjectSecurityPolicy.

The SystemObjectSecurityPolicy is the default security policy for its owner, the SystemUser (who has write authorization for any of the objects in this security policy). The “world” (that is, the set of all GemStone users) is authorized to read, but not write, the objects in this security policy. In addition, the group #System is authorized to write in this security policy.

DataCuratorObjectSecurityPolicy. This security policy is defined in the Globals dictionary. For backwards compatibility, the key #DataCuratorSegment also refers to this security policy, and may be used in upgraded repositories. The DataCuratorObjectSecurityPolicy object itself is protected by the DataCuratorObjectSecurityPolicy.

The DataCuratorObjectSecurityPolicy is the default security policy for its owner, the DataCurator (who has write authorization for any of the objects in this security policy). The “world” (that is, the set of all GemStone users) is authorized to read, but not write, the objects in this security policy. In addition, the #DataCuratorGroup is are authorized to write in this security policy.

Objects in the DataCuratorObjectSecurityPolicy include the Globals dictionary, the SystemRepository object, most instances of GsObjectSecurityPolicy, AllUsers (the set of all GemStone UserProfiles), AllGroups (the collection of groups authorized to read and write objects in security policies), and each UserProfile object.

PublishedObjectSecurityPolicy. This security policy is defined in the Globals dictionary. For backwards compatibility, the key #PublishedSegment also refers to this security policy, and may be used in upgraded repositories. The PublishedObjectSecurityPolicy object itself is protected by the DataCuratorObjectSecurityPolicy.

The PublishedObjectSecurityPolicy is owned by the SystemUser. The group #Subscribers is authorized to read in this security policy. The group #Publishers is authorized to read and write in this security policy. The “world” is not authorized to read or write the objects in this security policy.

Global Variables and Collections

AllGroups. This CanonicalStringDictionary is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. Each Symbol in AllGroups corresponds to a group of users. When GemStone is first installed, AllGroups contains the symbols #System, #Publishers, #Subscribers, #DataCuratorGroup, and #SymbolUser.

AllUsers. The AllUsers object (a UserProfileSet) is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. AllUsers contains the UserProfiles of all GemStone users. When GemStone is first installed, AllUsers contains five UserProfiles: SystemUser, DataCurator, GcUser, SymbolUser, and Nameless.

For more information on the Special system accounts, see Special System Users.

AllDeletedUsers. This collection is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. AllDeletedUsers contains DeletedUserProfiles representing GemStone users that have been removed from AllUsers. When GemStone is first installed, AllDeletedUsers is empty.

AllClusterBuckets. This ClusterBucketArray is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. AllClusterBuckets contains instances of ClusterBucket, which group objects on extent pages to improve performance. When GemStone is first installed, AllClusterBuckets contains the following predefined cluster buckets (listed by cluster id):

1. A generic bucket whose extent is “don’t care”. This bucket, the current default after session login, is invariant and may not be modified.

2. A generic bucket whose extent is “don’t care”.

3. A generic bucket whose extent is “don’t care”.

4. The kernel classes “behaviorBucket”, extent 1.

5. The kernel classes “descriptionBucket”, extent 1.

6. The kernel classes “otherBucket”, extent 1.

7. A generic bucket whose extent is “don’t care”.

ConfigurationParameterDict. This SymbolKeyValueDictionary is defined in the Globals dictionary, and is protected by the SystemObjectSecurityPolicy. Its keys list the names of the configuration parameters available to a session. Its values are only used internally in GemStone, to locate the values of the parameters themselves for an individual session.

DbfHistory. This String describes the history of this repository, from the version in which it was first created, and each subsequent upgrade.

DbfOrigin. This SmallInteger identifies the version in which this repository was first created, if the repository originated in v3.2 or later.

DeprecationEnabled. This is nil, or a keyword. When deprecation is enabled, it will be set to the configured handling instructions when a deprecated method is encountered. Deprecation is described in the Programming Guide.

ErrorSymbols. This SymbolDictionary is defined in the Globals dictionary, and is protected by the SystemObjectSecurityPolicy. It maps mnemonic symbols to error numbers.

GciStructsMd5String and GciTsStructsMd5String. These constants encode the GCI structures that this version of GemStone uses. On upgrade, they can be compared to determine if there are changes in the GCI structures that would impact C code using GemBuilder for C.

GemStoneError. This SymbolDictionary is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. Each key is a Symbol representing a native language, and is associated with an Array of error messages in that language. Initially, this dictionary contains the single key #English.

GemStone_Legacy_Streams. This SymbolDictionary contains classes implementing the legacy GemStone PositionableStream interface. See the Programming Guide for more information.

GemStone_Portable_Streams. This SymbolDictionary contains classes implementing the PositionableStream interface that is ANSI-complaint and portable to other Smalltalk dialects. See the Programming Guide for more information.

InstancesDisallowed. This IdentitySet is defined in the Globals dictionary, and is protected by the SystemObjectSecurityPolicy. This collection is used for error reporting for some cases where instance creation is disallowed.

NativeLanguage. This Symbol is not used in this version, but may exist in upgraded repositories.

NotTranloggedGlobals. This SymbolDictionary is defined in the Globals dictionary, and is protected by the DataCuratorObjectSecurityPolicy. This collection holds objects for which changes are committed but not recorded in the transaction logs. When GemStone is first installed, NotTranloggedGlobals is empty.NotTranloggedGlobals is described in the Programming Guide.

SourceStringClass. This is the default class used to instantiate literal strings, and to control the behavior of String comparison, including String equality, between traditional and Unicode strings. Changing the value should be done with great caution, since it may break existing collections of Strings and other usages that depend on string comparison. Strings are described in the Programming Guide.

Transcript. An instance of TranscriptStreamPortable.

 

Table A.1 Initial Contents of the Globals Dictionary

 

Key

The object’s class

Numeric Constants

#DecimalMinusInfinity

DecimalFloat

#DecimalMinusQuietNaN

DecimalFloat

#DecimalMinusSignalingNaN

DecimalFloat

#DecimalPlusInfinity

DecimalFloat

#DecimalPlusQuietNaN

DecimalFloat

#DecimalPlusSignalingNaN

DecimalFloat

#MinusInfinity

Float

#MinusQuietNaN

Float

#MinusSignalingNaN

Float

#PlusInfinity

Float

#PlusQuietNaN

Float

#PlusSignalingNaN

Float

Non-Numeric Constants

#false

Boolean

#nil

UndefinedObject

#true

Boolean

Repository and instances of GsObjectSecurityPolicy

#DataCuratorObjectSecurityPolicy, #DataCuratorSegment

GsObjectSecurityPolicy

#DbfHistory

String

#DbfOrigin

SmallInteger

#PositionableStream_position

String

#PublishedObjectSecurityPolicy, #PublishedSegment

GsObjectSecurityPolicy

#SystemRepository

Repository

#SystemObjectSecurityPolicy, #SystemSegment

GsObjectSecurityPolicy

Collections

#AllClusterBuckets

ClusterBucketArray

#AllDeletedUsers

IdentitySet

#AllGroups

CanonicalStringDictionary

#AllUsers

UserProfileSet

#ConfigurationParameterDict

SymbolKeyValueDictionary

#ErrorSymbols

SymbolDictionary

#GemStoneError

SymbolDictionary

#GemStone_Portable_Streams

SymbolDictionary

#GemStone_Legacy_Streams

SymbolDictionary

#Globals

SymbolDictionary

#InstancesDisallowed

IdentitySet

#LegacyErrNumMap

Array

#NotTranloggedGlobals

SymbolDictionary

Other Customer-usable Globals

#DeprecationEnabled

Symbol

#GciStructsMd5

String

#GciTsStructsMd5

String

#SourceStringClass

Class

#Transcript

TranscriptStreamPortable

GemStone Internal Objects

#AsciiCollatingTable

ByteArray

#ConversionReservedOopMap

Array

#ConversionStatus

Array

#DoubleByteAsciiCollatingTable

DoubleByteString

#FdcResults

UndefinedObject

#GcCandidates

UndefinedObject

#GcCandidatesCount

UndefinedObject

#GcHints

UndefinedObject

#GcWeakReferences

Array

#GemStoneRCLock

Object

#GsCompilerClasses

SymbolDictionary

#GsIndexingObjectSecurityPolicy, #GsIndexingSegment

GsObjectSecurityPolicy

#ImageVersion

SymbolDictionary

#ObsoleteClasses

SymbolDictionary

#QuadByteAsciiCollatingTable

QuadByteString

#RcBtreeNode

UndefinedObject

#_remoteNil

UndefinedObject

#SecurityDataObjectSecurityPolicy, #SecurityDataSegment

GsObjectSecurityPolicy

#SharedDependencyLists

DepListTable

#VersionParameterDict

SymbolKeyValueDictionary

plus all kernel classes

Current TimeZone

Each instance of DateTime includes a reference to a TimeZone object, which handles the conversion from the internally stored Greenwich Mean Time (GMT, also referred to as UTC or Coordinated Universal Time) and the local time. TimeZones encapsulate the daylight savings time (DST) rules, so a given GMT time is adjusted to local time based on TimeZone and the specific date. TimeZones are also used to calculate the internal stored GMT for newly created DateTime instances.

Each session has a current TimeZone and a default TimeZone, which are used to display times, and in DateTime creation when methods that do not explicitly specify the TimeZone are used. These are installed as part of application installation or configuration; by default, the GemStone distribution has the America/Los_Angeles TimeZone installed. This is described in the GemStone/S 64 Bit Installation Guide.

GemStone uses the public domain zoneinfo database to create TimeZone, loading the information from platform and language independent source files. If the rules change for the TimeZone that your application uses, you must recreate the TimeZone instance from the source files. Depending on the nature of the rules change, you may also need to update references from DateTime instances to the new TimeZone instance, or possibly update the DateTime internal offsets.

There are a number of ways to create TimeZone instances for your application:

newTZ := TimeZone fromOS
newTZ := TimeZone fromGemPath: '$GEMSTONE/pub/timezone/etc/ zoneinfo/Europe/Zurich'

or, if GemStone’s time zone database is installed in the default location:

newTZ := TimeZone named: 'Europe/Zurich'

newTZ := TimeZone fromGemPath: yourPath, '/Europe/Zurich'.

You must then install this TimeZone instances as the current and default time zone.

Zoneinfo

The widely used public-domain time zone database, ZoneInfo or tz, contains code and data that records time zone information for locations worldwide. It is updated periodically when boundaries or rules change in any of the represented locations.

Each record in the tz database represents a location where all clocks are kept on the same time as each other throughout the year, coordinating any time adjustments such as DST, and have done so for many years. Locations are identified by continent (or ocean, for islands) and name, which is usually the largest city within the region. For example, America/Los_Angeles, Europe/London, etc.

tz is provided as text files, which may be compiled into binary files using tz’s compilers. GemStone’s TimeZone implementation uses the compiled binary form, which is also used by the Solaris and Linux operating systems. GemStone’s files are based on tzdata2015d.tar.gz. To get updated source files, download from:

http://www.iana.org/time-zones

The timezone sources may be compiled using the zic timezone compiler, which GemStone provides as a convenience (see zic).

Utilities

tzselect, zdump and zic are public domain, open source utilities that are useful in working with the zoneinfo database. These utilities are provided with the Solaris and Linux operating systems; for the convenience of users on other operating systems, these utilities are provided along with the other zoneinfo database files.

NOTE
These are not GemStone utilities. Support for their use is not provided by GemStone.

You may download the source code for these utilities here:

http://www.iana.org/time-zones

Shipped files are based on tzcode2015d.tar.gz. Documentation for these utilities is provided as man pages. To read the man pages, add the directory $GEMSTONE/pub/timezone/man to the MANPATH.

To run these, you may wish to add $GEMSTONE/pub/timezone/etc to the executable path.

tzselect

tzselect allows to you interactively select a time zone. The interactive script asks you a series of questions about the current location and outputs the resulting time zone description to standard output. The output is suitable as a value for the TZ environment variable and GemStone scripts.

You may need to set the environment variable $TZDIR to $GEMSTONE/pub/timezone/etc/zoneinfo (or the path to your zoneinfo database, for this script to work correctly. You may also need to set the environment variable $AWK, to any POSIX compliant awk program.

For further details on using tzselect see the man page.

zdump
zdump [-v] [-c cutoffyear] [zonename...]

zdump prints time zone information. It prints the current time for each time zone (zonename) listed on the command line.

Specifying an invalid zone name to zdump does NOT return an error; instead, it returns the zdump output for GMT. This reflects the same behavior of the time routines in libc.

The -v option will display the entire contents of the time zone database for the given time zone name.

For further details on using zdump, including the command line options, see the man page.

zic
zic [-s] [-v] [-l localtime] [-p posixrules]  [-d directory] 
[-y yearistype] [filename...]

zic compiles time zone source files. It reads input text in files named on the command line, and creates the time zone binary files.

To create files in a specific location, rather than the standard platform directory (on Solaris, /usr/share/lib/zoneinfo), use the -d directory option.

For example, to recompile sources on Solaris to the GemStone timezone database, execute the following:

zic -d $GEMSTONE/pub/timezone/etc/zoneinfo/
	/usr/share/lib/zoneinfo/src/northamerica

For further details on using zic, including the command line options and the structure of the source code files, see the man page for zic.

Previous chapter

Next chapter