GemStone/S 64 Bit Programmer's Guide

  • 1. Introduction to GemStone

    • 1.1 GemStone Overview

      • Multi-User

      • Programmable

      • Scalable

      • Object Database

      • Partition Between Client and Server

      • Connect to Outside Data Sources

    • 1.2 GemStone Services

      • Transactions and Concurrency Control

      • Login Security and Account Management

      • Services To Manage the GemStone Repository

    • 1.3 GemStone Smalltalk

      • No User Interface

      • GemStone Sessions

        • System Management Classes

      • Monitoring your application

        • File In and File Out

      • Interapplication Communications

    • 1.4 Process Architecture

      • Gem Process

      • Stone Process

      • NetLDI

      • Shared Page Cache

      • Extents and Repositories

      • Transaction Log

  • 2. Class Creation

    • 2.1 Subclass Creation

      • Implementation Formats

      • Class Variables and Other Types of Variables

        • Dynamic Instance Variables

      • Additional Class Creation Protocol

    • 2.2 Creating Classes With Invariant Instances

      • Per-Object Invariance

      • Invariance for All Instances of a Class

    • 2.3 Creating Classes with Special Cases of Persistence

      • Non-Persistent Classes

      • DbTransient

  • 3. Resolving Names and Sharing Objects

    • 3.1 Sharing Objects

    • 3.2 UserProfile and Session-Based Symbol Lists

      • What’s In Your Symbol List?

      • Examining Your Symbol List

      • Inserting and Removing Dictionaries from Your Symbol List

      • Updating Symbol Lists

      • Finding Out Which Dictionary Names an Object

    • 3.3 Using Your Symbol Dictionaries

      • Publishers, Subscribers and the Published Dictionary

  • 4. Collection and Stream Classes

    • 4.1 Introduction to Collections

      • Protocol Common to All Collections

        • Creating Instances

        • Enumerating

      • Collections in multi session environment

        • Conflicting updates

        • Visibility and ordering

      • Collection classes

      • Dictionary classes

        • Internal Dictionary Structure

        • Dictionary and KeyValueDictionary

        • KeySoftValueDictionary

      • SequenceableCollection classes

        • Copying

        • Array

        • SortedCollection

      • Stream Classes

        • PositionableStream and Position

        • AppendStream

      • UnorderedCollection classes

        • Union, Intersection, and Difference

    • 4.2 Reduced-Conflict Collection Classes

      • RcArray

      • NSC/UnorderedCollection classes

        • RcIdentityBag

        • RcLowMaintenanceIdentityBag

        • RcIdentitySet

      • RcKeyValueDictionary

      • Queue classes

        • GsPipe

        • RcPipe

        • RcQueue

    • 4.3 GsBitmap

      • GsBitmaps and their objects

      • Bitmap files

    • 4.4 Sorting the objects in a collection

      • Default Sort

      • Sorting Application objects

        • Sorting in multiple orders

      • SortBlocks

      • Sorting Large Collections

  • 5. String Classes and Collation

    • 5.1 Characters and Unicode

      • Unicode and the Unicode Database

    • 5.2 String classes

      • Traditional Strings

      • Unicode Strings

      • String equality, ordering, and interoperation

      • Other String-like classes

        • Symbol

        • ByteArray

        • Utf8

      • String protocol

        • Creating Strings

        • Concatenating Strings

        • Converting between String classes and encodings

        • String Transformations

        • Equality and Identity

        • Searching and Pattern matching

    • 5.3 String Sorting and Collation

      • Comparison Mode

        • StringConfiguration

      • Legacy String Comparison Mode for Traditional Strings

      • Unicode Comparison Mode and ICU Collation

        • IcuLocale

        • IcuCollator

        • Customizing Sort

        • IcuSortedCollection

      • ICU libraries and versioning

        • ICU and Unicode versioning

        • IcuLibraryVersion

    • 5.4 Encrypting Strings

  • 6. Numeric Classes

    • 6.1 Integers

      • SmallInteger

      • LargeInteger

      • Printing Integers

    • 6.2 Binary Floating Point

      • SmallDouble

      • Float

        • Avoiding Exceptional Floats

      • Literal Floats

      • Printing Binary Floating Points

    • 6.3 Other Rational Numbers

      • Fractions

        • SmallFraction

        • Fraction

      • FixedPoint

      • ScaledDecimal

      • DecimalFloat

      • Summary of literal syntax

      • Custom numeric literals

    • 6.4 Internationalizing Decimal Points using Locale

    • 6.5 Random Number Generator

  • 7. Indexes and Querying

    • 7.1 Overview

      • Business Objects

      • Database Collection

      • Queries

      • GemStone Indexes and Queries

        • Indexes

        • GsQueries

        • Deciding what to optimize

        • Overview of the steps in creating and using indexed queries

        • Managing Indexes

      • Special Syntax for Indexing

        • Historic indexing syntax

      • Last Element Class

        • Optimized classes

        • Using other classes

        • Comparing data types

        • Strings in indexes

        • Redefining Comparison Messages

    • 7.2 Defining Queries

      • Query Predicate Syntax

        • Predicate Terms

        • Combining Predicates using Boolean Logic

        • Combining Range Predicates

      • Creating a GsQuery

        • Query Variables

    • 7.3 Creating Indexes

      • Equality and Identity Indexes

      • Btree and Legacy Indexes

      • Creating the Index

      • Equality Indexes on strings

        • Repositories in Legacy String Comparison mode

        • Repositories in Unicode Comparison Mode

      • Implicit Indexes

      • GsIndexOptions

        • Combining options

        • Default options

        • The Options in GsIndexOptions

        • Reduced-Conflict

        • Optional pathTerms

    • 7.4 Results of Executing a GsQuery

      • GsQuery’s Collection protocol

      • GsQuery enumeration methods accepting blocks

      • Query results as Streams

        • Limitations on streamable queries

    • 7.5 Enumerated and Set-valued Indexes

      • Enumerated path terms in indexes and queries

        • Restrictions on predicates with enumerated pathTerms

      • Indexes and Queries with collections on the path

        • Set-valued query results

        • Restrictions on predicates in set-valued queries

    • 7.6 Managing Indexes

      • While Indexes are Being Created

        • Queries during index creation

        • Auto-commit

      • Indexes on temporary collections

      • Inquiring About Indexes

      • Removing Indexes

        • To remove indexes based on a GsIndexSpec

        • To remove indexes using IndexManager

        • Rebuilding Indexes

      • Indexing Errors

      • Auditing Indexes

    • 7.7 Indexing and Performance

      • Type of index

      • Data updates

      • Formulating queries and performance

        • Auto-optimize

    • 7.8 Historic Indexing API differences

      • Index creation using UnorderedCollection protocol

        • Internal legacy vs. btreePlus indexing structures

        • String and Unicode Equality Indexes

        • Reduced-conflict Equality Indexes

      • Queries using Selection Blocks

        • Executing Selection Block Queries

      • Managing indexes

        • Information about indexes

        • Removing Indexes

  • 8. Transactions and Concurrency Control

    • 8.1 GemStone’s Conflict Management

      • Views and Transactions

      • Transaction State and Transaction Modes

      • Reading and Writing in Transactions

      • Reading and Writing Outside of Transactions

      • When Should You Commit a Transaction?

      • Nested In-memory Transactions

    • 8.2 How GemStone Detects and Manages Conflict

      • Concurrency Management

      • Committing Transactions

      • Handling Commit Failure in a Transaction

      • Indexes and Concurrency Control

      • Aborting Transactions

        • Updating the View Without Committing or Aborting

        • Being Signaled To Abort

        • Being Signaled to continueTransaction

      • Handlers for abort or continueTransaction notifications

    • 8.3 Controlling Concurrent Access with Locks

      • Lock Types

        • Read Locks

        • Write Locks

      • Acquiring Locks

        • Lock Denial

        • Dead Locks

        • Dirty Locks

        • Locking Collections of Objects Efficiently

        • Upgrading Locks

      • Locking and Indexed Collections

      • Removing or Releasing Locks

        • Releasing Locks Upon Aborting or Committing

      • Inquiring About Locks

      • Application Write Locks

    • 8.4 Classes That Reduce the Chance of Conflict

      • RcCounter

      • Reduced-Conflict Collection Classes

        • RcArray

        • RcIdentityBag

        • RcLowMaintenanceIdentityBag and RcIdentitySet

        • RcKeyValueDictionary

        • GsPipe

        • RcPipe

        • RcQueue

  • 9. Object Security and Authorization

    • 9.1 How GemStone Security Works

      • Login Authorization

        • The UserProfile

      • System Privileges

      • Object-level Security

        • GsObjectSecurityPolicy

    • 9.2 Assigning Objects to Security Policies

      • Default Security Policy and Current Security Policy

      • Objects and Security Policies

      • Configuring Authorization for an Object Security Policy

        • How GemStone Responds to Unauthorized Access

        • Owner, Group, and World Authorization

      • Predefined GsObjectSecurityPolicies

        • Changing the Security Policy for an Object

        • Revoking Your Own Authorization: a Side Effect

        • Finding Out Which Objects Are Protected by a Security Policy

    • 9.3 Application Example

    • 9.4 Development Example

    • 9.5 Planning Security Policies for User Access

      • Protecting the Application Classes

      • CodeModification privilege

      • Planning Authorization for Data Objects

      • Planning Groups

      • Planning Security Policies

      • Developing the Application

        • Setting Up Security Policies for Joint Development

        • Making the Application Accessible for Testing

        • Moving the Application into a Production Environment

      • Security Policy Assignment for User-created Objects

    • 9.6 Privileged Protocol for Class GsObjectSecurityPolicy

  • 10. Class versions and Instance Migration

    • 10.1 Versions of Classes

      • Defining a New Version

      • New Versions and Subclasses

      • New Versions and References in Methods

      • Class Variables and Class Instance Variables

    • 10.2 ClassHistory

      • Defining a Class as a new version of an existing Class

      • Accessing a Class History

      • Assigning a Class History

    • 10.3 Migrating Objects

      • Migration Destinations

      • Migrating Instances

      • Finding Instances

        • Finding References to Instances

        • Managing resources

      • Using the Migration Destination

        • Bypassing the Migration Destination

      • Migration Errors

        • Migrating self

        • Migrating Instances that Participate in an Index

      • Instance Variable Mappings

        • Default Instance Variable Mappings

        • Customizing Instance Variable Mappings

  • 11. File I/O and Operating System Access

    • 11.1 Accessing Files

      • Specifying Files

      • Creating a File

      • Opening a File

      • Closing a File or Files

      • Writing to a File

      • Reading from a File

        • Positioning

      • Testing Files

      • Renaming Files

      • Removing Files

      • Examining a Directory

      • GsFile Errors

    • 11.2 Executing Operating System Commands

      • Simple Commands

      • More complex interactions

    • 11.3 File In and File Out

      • Fileout

      • Filein

    • 11.4 PassiveObject

    • 11.5 Creating and Using Sockets

      • GsSocket

        • Establishing the connection

        • Communication on the socket

        • Closing the socket

        • Socket Configuration

      • GsSecureSocket

        • Certificates, keys, and passphrases

        • Enable or disable verifying CA Certificate

        • Set certificate, private key, and passphrase

        • Setup the Cipher list

        • Establishing the connection

        • Communication on the socket

        • Closing the socket

        • HTTPS connection

      • Error handling

        • GsSocket

        • GsSecureSocket

  • 12. Signals and Notifiers

    • 12.1 Communicating Between Sessions

    • 12.2 Object Change Notification

      • Setting Up a Notify Set

        • Adding an Object to a Notify Set

        • Adding a Collection to a Notify Set

        • Listing Your Notify Set

        • Removing Objects From Your Notify Set

      • Notification of New Objects

        • Receiving Object Change Notification

        • Reading the Set of Signaled Objects

      • Polling for Changes to Objects

      • Troubleshooting

        • Frequently Changing Objects

        • Special Classes

      • Methods for Object Notification

    • 12.3 Gem-to-Gem Signaling

      • Sending a Signal

        • Receiving a Signal

    • 12.4 Other Signal-Related Issues

      • Inactive Gem

      • Dealing With Signal Overflow

        • Sending Large Amounts of Data

      • Maintaining Signals and Notification When Users Log Out

  • 13. Handling Exceptions

    • 13.1 The Exception Class Hierarchy

    • 13.2 Signaling Exceptions

    • 13.3 Handling Exceptions

      • Dynamic (Stack-Based) Handlers

      • Selecting a Handler

      • Flow of Control

      • Default Handlers

      • Default Actions

    • 13.4 The Legacy Exception Handling Framework

      • Dynamic (Stack-Based) Exception Handler

        • Installing a Dynamic (Stack-Based) Exception Handler

      • Default (Static) Exception Handlers

        • Installing a Default (Static) Exception Handler

        • GemStone Event Exceptions

      • Flow of Control

        • Signaling Other Exception Handlers

        • Removing Exception Handlers

        • Recursive Errors

      • Raising Exceptions

      • ANSI Integration

  • 14. Performance and Optimization

    • 14.1 Profiling Smalltalk Execution

      • Time to execute a block

        • CPU Time

        • Elapsed Time

      • ProfMonitor

        • Sample intervals

        • Reporting limits

        • Reports

        • Temporary results file

        • Real vs. CPU time

      • Profiling Code

        • Convenience Profiling of a Block of Code

        • Background Profiling

        • Manual Profiling

        • Saving a ProfMonitor for later analysis

      • The Profile Report

      • Profiling Beyond Performance

        • Object Creation Tracking

        • Memory Use Profiling

    • 14.2 Clustering Objects for Faster Retrieval

      • Will Clustering Solve the Problem?

      • Cluster Buckets

        • Using Existing Cluster Buckets

        • Creating New Cluster Buckets

        • Cluster Buckets and Concurrency

        • Cluster Buckets and Indexing

      • Clustering Objects

        • The Basic Clustering Message

        • Depth-First Clustering

        • Assigning Cluster Buckets

        • Clustering and Memory Use

        • Using Several Cluster Buckets

        • Clustering Class Objects

      • Maintaining Clusters

        • Determining an Object’s Location

        • Why Do Objects Move?

    • 14.3 Modifying Cache Sizes for Better Performance

      • GemStone Caches

        • Temporary Object Space

        • Gem Private Page Cache

        • Stone Private Page Cache

        • Shared Page Cache

      • Getting Rid of Non-Persistent Objects

    • 14.4 Managing VM Memory

      • Large Working Set

      • Class Hierarchy

      • UserAction Considerations

      • Exported Set

      • Debugging out of memory errors

      • Signal on low memory condition

      • Methods for Computing Temporary Object Space

      • Statistics for monitoring memory use

    • 14.5 NotTranloggedGlobals

    • 14.6 Other Optimization Hints

  • 15. Working with Classes and Methods

    • 15.1 Creating and Removing Methods

      • Defining Simple Accessing and Updating Methods

      • Compiling Methods

      • Removing Methods

      • Pragmas

        • Pragma class

    • 15.2 Information about Class and Methods

      • Information about the Class

      • Information about Instance, Class, and Shared Pool variables

      • Information about Method Selectors

      • Accessing and Managing Method Categories

      • Specific Methods

    • 15.3 Transient Methods

    • 15.4 ClassOrganizer

    • 15.5 Handling Deprecated Methods

      • Deprecated handling

      • Deprecation log

      • Listing deprecated methods

      • Determining senders of deprecated methods

  • 16. GemStone System Features

    • 16.1 Hidden Sets

      • Sets still accessed via System methods

        • NotifySet

        • ExportedDirtyObjs and TrackedDirtyObjs

        • PureExportSet and GciTrackedObjs

    • 16.2 SessionTemps and access to Session State

      • SessionState

    • 16.3 Shared Counters

      • AppStat Shared Counters

      • Persistent Shared Counters

    • 16.4 GsEventLog

      • Adding events

      • Querying and reporting

      • Deleting events

  • 17. The Foreign Function Interface

    • 17.1 Overview of the Foreign Function Interface

    • 17.2 FFI Core Classes

      • CLibrary

      • CCallout

      • C type symbols

      • Limitations with native code disabled

      • CCallin

      • CByteArray

      • CFunction

      • CPointer

    • 17.3 FFI Wrapper Utilities

      • Creating a Smalltalk class

  • 18. External Sessions

    • 18.1 Specifying NRS with GsNetworkResourceString

      • Gem NRS methods

      • Stone NRS methods

      • GsNetworkResourceString direct protocol

    • 18.2 Using External Sessions

      • Setup the External Session

        • Creating the External Session

      • Log in the External Session

      • Executing Code

      • Managing Remote Sessions

        • Managing transaction state

        • Logging

        • Breaking remote execution

      • Important caution on Export Set of remote session

      • Exceptions

  • 19. The SUnit Framework

    • 19.1 Why SUnit?

    • 19.2 Testing and Tests

    • 19.3 SUnit by Example

      • Examining the Value of a Tested Expression

      • Finding Out If an Exception Was Raised

    • 19.4 The SUnit Framework

    • 19.5 Understanding the SUnit Implementation

      • Running a Single Test

      • Running a TestSuite

    • 19.6 For More Information

  • A. GemStone Smalltalk Syntax

    • A.1 GemStone and ANSI Smalltalk

    • A.2 GemStone Smalltalk

      • How to Create a New Class

      • Case-Sensitivity

      • Statements

      • Comments

      • Expressions

        • Kinds of Expressions

        • Literals

        • Numeric Literals

        • Character Literals

        • String Literals

        • Symbol Literals

        • Array Literals

      • Variables and Variable Names

        • Declaring Temporary Variables

        • Pseudovariables

      • Assignment

      • Message Expressions

        • Messages

      • Reserved and Optimized Selectors

        • Messages as Expressions

      • Combining Message Expressions

        • Summary of Precedence Rules

      • Cascaded Messages

      • Array Constructors

      • Path Expressions

      • Returning Values

    • A.3 Blocks

      • Blocks with Arguments

      • Blocks and Conditional Execution

        • Conditional Selection

        • Two-Way Conditional Selection

        • Conditional Repetition

      • Formatting Code

    • A.4 GemStone Smalltalk BNF

Copyright 2017 GemTalk Systems